build(Containerfile): refactor build (wrong relative context)
This commit is contained in:
parent
4147109c9f
commit
8786fe1f24
1 changed files with 5 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Reference in a new issue