Skip to content

Commit

Permalink
update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
vhvb1989 committed Jan 4, 2024
1 parent 9ce811f commit 7cf60f0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions templates/todo/web/vite-react-fluent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,16 @@ WORKDIR /app

COPY . .

# Fix up entrypoint line endings and make exec
RUN apk update && apk add --no-cache dos2unix \
&& dos2unix /app/entrypoint.sh && chmod +x /app/entrypoint.sh \
&& apk del dos2unix

# install project dependencies
RUN npm ci
RUN npm run build

FROM nginx:alpine

WORKDIR /usr/share/nginx/html
COPY --from=build /app/entrypoint.sh /bin
COPY --from=build /app/build .
COPY --from=build /app/dist .
COPY --from=build /app/nginx/nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 80

CMD ["/bin/sh", "-c", "echo $REACT_APP_WEB_BASE_URL && /bin/entrypoint.sh -o /usr/share/nginx/html/env-config.js && nginx -g \"daemon off;\""]
CMD ["/bin/sh", "-c", "nginx -g \"daemon off;\""]

0 comments on commit 7cf60f0

Please sign in to comment.