20241113-a
This commit is contained in:
25
docker/Dockerfile.build
Normal file
25
docker/Dockerfile.build
Normal file
@@ -0,0 +1,25 @@
|
||||
# build environment
|
||||
FROM node:16 as builder
|
||||
WORKDIR /app
|
||||
ENV PATH /app/node_modules/.bin:$PATH
|
||||
COPY package.json ./
|
||||
COPY package-lock.json ./
|
||||
RUN npm install
|
||||
COPY . ./
|
||||
RUN npm run build
|
||||
|
||||
# production environment
|
||||
FROM nginx:stable-alpine
|
||||
ARG version=0.0.0
|
||||
ENV VERSION=${version}
|
||||
# ENV INTERCEPT_POST=true
|
||||
|
||||
COPY --from=builder /app/dist /etc/nginx/html
|
||||
COPY docker/nginx/nginx.conf /etc/nginx/nginx.conf
|
||||
COPY docker/nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
COPY docker/docker-entrypoint.sh /docker-entrypoint.d/40-dynamic-subpath.sh
|
||||
RUN chmod +x /docker-entrypoint.d/40-dynamic-subpath.sh \
|
||||
&& echo ${version} > /etc/nginx/html/VERSION
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user