diff --git a/docker/Dockerfile b/docker/Dockerfile index 30c09a2b..0ed3ab1f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -7,12 +7,9 @@ FROM node:${NODE_VERSION}-${BASE_VERSION} as builder WORKDIR /app -RUN apk --no-cache add git - COPY package.json yarn.lock ./ -RUN --mount=type=cache,target=/root/.yarn \ - YARN_CACHE_FOLDER=/root/.yarn yarn install +RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install COPY . ./ @@ -20,7 +17,7 @@ RUN yarn build FROM nginxinc/nginx-unprivileged:1.25-alpine -COPY --chown=nginx:nginx docker/nginx/nginx.conf /etc/nginx/nginx.conf +COPY --chown=nginx:nginx nginx.conf /etc/nginx/nginx.conf COPY --from=builder --chown=nginx:nginx /app/dist /usr/share/nginx/html/insights/ COPY docker-entrypoint.sh / RUN mv /usr/share/nginx/html/insights/index.html /usr/share/nginx/html/insights/index.html.tmpl \ @@ -28,5 +25,7 @@ RUN mv /usr/share/nginx/html/insights/index.html /usr/share/nginx/html/insights/ && ln -s /tmp/index.html EXPOSE 8080 + ENTRYPOINT ["/docker-entrypoint.sh"] + CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file