1
0
Fork 0

build(Containerfile): refactor build (wrong relative context)

This commit is contained in:
Vojtěch Mareš 2022-08-20 20:06:36 +02:00
parent 4147109c9f
commit 8786fe1f24
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D

View file

@ -3,17 +3,16 @@ ARG SITE
WORKDIR /build
COPY ./sites/${SITE}/package.json .
COPY . ./
RUN yarn install --frozen-lockfile
WORKDIR /build/sites/${SITE}
COPY ./sites/${SITE}/. ./
RUN yarn build
RUN yarn install --frozen-lockfile && yarn build
# Final image
FROM nginx:mainline-alpine as nginx
ARG SITE
COPY ./build/nginx/site.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /build/out /var/www/html
COPY --from=builder /build/sites/${SITE}/out /var/www/html