updated dockerfile
Some checks failed
gitea_dndsources/schedulord-frontend/pipeline/head There was a failure building this commit
Some checks failed
gitea_dndsources/schedulord-frontend/pipeline/head There was a failure building this commit
This commit is contained in:
parent
97c0be8dda
commit
59fc94b751
8
.dockergnore
Normal file
8
.dockergnore
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
.git
|
||||||
|
.editorconfig
|
||||||
|
/.vscode/*
|
||||||
|
/node_modules
|
||||||
|
/e2e
|
||||||
|
/docs
|
||||||
|
.gitignore
|
||||||
|
*.zip
|
30
Dockerfile
30
Dockerfile
@ -1,11 +1,21 @@
|
|||||||
#FROM - Image to start building on.
|
# STEP 1:
|
||||||
FROM ubuntu:14.04
|
# Name the node stage "builder"
|
||||||
|
FROM node:latest AS builder
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /app
|
||||||
|
# Copy all files from current directory to working dir in image
|
||||||
|
COPY . .
|
||||||
|
# install node modules and build assets
|
||||||
|
RUN npm i && npm run build
|
||||||
|
|
||||||
#MAINTAINER - Identifies the maintainer of the dockerfile.
|
# STEP 2:
|
||||||
MAINTAINER jesse.isler@gmail.com
|
# nginx state for serving content
|
||||||
|
FROM nginx:alpine
|
||||||
#RUN - Runs a command in the container
|
# Set working directory to nginx asset directory
|
||||||
RUN echo "Hello world" > /tmp/hello_world.txt
|
WORKDIR /usr/share/nginx/html
|
||||||
|
# Remove default nginx static assets
|
||||||
#CMD - Identifies the command that should be used by default when running the image as a container.
|
RUN rm -rf ./*
|
||||||
CMD ["cat", "/tmp/hello_world.txt"]
|
# Copy static assets from builder stage
|
||||||
|
COPY --from=builder /app/dist/schedulord-backend .
|
||||||
|
# Containers run nginx with global directives and daemon off
|
||||||
|
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|
Loading…
Reference in New Issue
Block a user