File tree Expand file tree Collapse file tree 3 files changed +51
-18
lines changed
Expand file tree Collapse file tree 3 files changed +51
-18
lines changed Original file line number Diff line number Diff line change 1+ name : ci
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+
9+ jobs :
10+ path-context :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Check out the repo
14+ uses : actions/checkout@v2
15+ - name : Set up QEMU
16+ uses : docker/setup-qemu-action@v1
17+ - name : Set up Docker Buildx
18+ uses : docker/setup-buildx-action@v1
19+ - name : Login to DockerHub
20+ uses : docker/login-action@v1
21+ with :
22+ username : ${{ secrets.DOCKERHUB_USERNAME }}
23+ password : ${{ secrets.DOCKERHUB_TOKEN }}
24+ - name : Build and push
25+ id : docker_build
26+ uses : docker/build-push-action@v2
27+ with :
28+ context : ./server
29+ file : ./server/Dockerfile
30+ push : true
31+ tags : koa-vue-fullstack/server:latest
32+ - name : Image digest
33+ run : echo ${{ steps.docker_build.outputs.digest }}
Original file line number Diff line number Diff line change 1- # Use an node 8 runtime as a parent image
2- FROM node:8.9.4
3-
4- # Set environment vaiable: server port as 3002
5- ENV AUTH_SECRET=vHJcV7
6-
7- # Set the working directory to /server
8- WORKDIR /server
9-
10- # Copy the current directory contents into the container at /server
11- ADD . /server
12-
13- RUN npm install
14-
15- # Make port 3000 available to the world outside this container
16- EXPOSE 3000
17-
18- CMD ["npm" , "run" , "build" ]
1+ # Use an node 10 runtime as a parent image
2+ FROM node:10.12.0
3+
4+ # Set environment vaiable: server port as 3002
5+ ENV AUTH_SECRET=vHJcV7
6+
7+ # Set the working directory to /server
8+ WORKDIR /server
9+
10+ # Copy the current directory contents into the container at /server
11+ ADD . /server
12+
13+ RUN npm install
14+
15+ # Make port 3000 available to the world outside this container
16+ EXPOSE 3000
17+
18+ CMD ["npm" , "run" , "build" ]
You can’t perform that action at this time.
0 commit comments