How can do multistage build with docker #96
ahmetoruc1979
started this conversation in
Feedback
Replies: 1 comment
-
I have deleted * from COPY --from=builder /opt/adr/.log4brains/out/* ./ |
Beta Was this translation helpful? Give feedback.
0 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
I am trying to build log4brains in a multi-stage docker file. After the build operation, I am deploying static files to an Nginx. But, Adr's and some links are broken. Because in the output folder there is no folder with the name "l4b-static". I think the output folder has some differences.
The docker file is below:
FROM node:14.18-alpine3.14 AS builder
RUN npm install -g log4brains
ENV ADR_HOME=/opt/adr
WORKDIR /usr/src/app
COPY package.json ./
COPY tsconfig.json ./
RUN npm install
RUN npm install -g log4brains
WORKDIR ${ADR_HOME}
COPY docs ./docs
COPY .log4brains.yml ./
RUN log4brains build
FROM nginx:alpine
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY --from=builder /opt/adr/.log4brains/out/* ./
ENTRYPOINT ["nginx", "-g", "daemon off;"]
Beta Was this translation helpful? Give feedback.
All reactions