Skip to content

Commit 80c1788

Browse files
committed
add docker
1 parent 49638c9 commit 80c1788

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/docker.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
name: Publish to Docker Hub
7+
8+
on:
9+
push:
10+
branches: [ master ]
11+
12+
jobs:
13+
push_to_registry:
14+
name: Push Docker image to Docker Hub
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out the repo
18+
uses: actions/checkout@v2
19+
20+
- name: Log in to Docker Hub
21+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
22+
with:
23+
username: jmer05
24+
password: ${{ secrets.DOCKER_HUB }}
25+
26+
- name: Build
27+
run: |
28+
docker build -t jmer05/${{ github.repository }} .
29+
30+
- name: Push
31+
run: |
32+
docker push jmer05/${{ github.repository }}

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM node:18
2+
3+
WORKDIR /app
4+
5+
COPY package*.json ./
6+
7+
RUN npm install
8+
9+
COPY . .
10+
11+
RUN npm run build
12+
13+
CMD [ "node", "." ]

0 commit comments

Comments
 (0)