Skip to content

Commit bdd8934

Browse files
vieiralucasAdityaPimpalkar
authored andcommitted
chore: optimize size of front docker image (twentyhq#965)
1 parent f3a07a0 commit bdd8934

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

infra/prod/front/Dockerfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18.16.0-alpine as front
1+
FROM node:18.16.0-alpine as build
22

33
ARG REACT_APP_API_URL
44
ARG REACT_APP_AUTH_URL
@@ -12,6 +12,11 @@ COPY ./front .
1212
RUN yarn install
1313
RUN yarn build
1414

15+
FROM node:18.16.0-alpine as front
16+
17+
WORKDIR /app/front
18+
COPY --from=build /app/front/build ./build
19+
1520
RUN yarn global add serve
1621

1722
CMD ["serve", "-s", "build"]

0 commit comments

Comments
 (0)