From 1ff71d099ea3f4168af0fd4350920c079c1a222e Mon Sep 17 00:00:00 2001 From: Matt Low Date: Thu, 25 Feb 2021 00:38:11 -0700 Subject: [PATCH] Update Dockerfile --- Dockerfile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index df7e65d..7143bf8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,6 @@ # dev stage FROM node:14-alpine as dev WORKDIR /app -RUN apk update && apk add --no-cache python3 make gcc g++ COPY package*.json ./ RUN npm ci COPY . . @@ -14,21 +13,13 @@ RUN npx tsc && npm prune --production FROM node:14-alpine WORKDIR /app -RUN printf "%b" '#!'"/bin/sh\n\ -set -e\n\ -if [ ! -z \"\$RUN_MIGRATIONS\" ]; then\n\ - echo \"Running migrations.\"\n\ - npm run knex:migrate:latest\n\ -fi\n\ -exec \"\$@\"\n" > docker-entrypoint.sh && chmod +x docker-entrypoint.sh +RUN apk add --update --no-cache util-linux # Copy over production modules and dist folder COPY --from=build /app/package*.json ./ COPY --from=build /app/node_modules ./node_modules COPY --from=build /app/dist ./dist -COPY --from=build /app/db ./db EXPOSE 4000 -ENTRYPOINT [ "./docker-entrypoint.sh" ] CMD [ "node", "dist/main.js" ]