kateb-panel/Dockerfile

27 lines
692 B
Docker
Raw Permalink Normal View History

2020-10-05 09:29:15 +00:00
# The builder from node image
FROM node:alpine as builder
# build-time variables
# prod|sandbox its value will be come from outside
ARG env=prod
RUN apk update && apk add --no-cache make git
# Move our files into directory name "app"
WORKDIR /app
COPY package.json package-lock.json /app/
RUN npm install @angular/cli@6.0.8 -g
RUN cd /app && npm install
COPY . /app
# Build with $env variable from outside
2020-10-05 09:39:15 +00:00
RUN cd /app && npm run build
2020-10-05 09:29:15 +00:00
# Build a small nginx image with static website
FROM nginx:alpine
RUN rm -rf /usr/share/nginx/html/*
COPY nginx.conf /etc/nginx/nginx.conf
2020-10-05 09:46:07 +00:00
COPY --from=builder /app/dist/kateb-panel /usr/share/nginx/html
2020-10-05 09:29:15 +00:00
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]