Skip to content
This repository was archived by the owner on Nov 12, 2024. It is now read-only.

Commit 4197d22

Browse files
committed
build docker image
1 parent 2eacb43 commit 4197d22

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Docker Build and Push
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
id-token: write
10+
contents: read
11+
actions: read
12+
13+
jobs:
14+
build-and-push:
15+
runs-on: ubuntu-22.04
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Set up buildx
20+
uses: docker/setup-buildx-action@v2
21+
22+
- name: Login to GitHub Container Registry
23+
uses: docker/login-action@v2
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Build and push images
30+
uses: docker/build-push-action@v3
31+
with:
32+
context: .
33+
file: ./Dockerfile
34+
target: ghcr.io/hpcslab/cfp-summary-server
35+
tags: ${{ github.sha }}
36+
push: true

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM node:22
2+
3+
WORKDIR /work
4+
COPY api .
5+
COPY db .
6+
COPY views .
7+
COPY index.js .
8+
COPY package.json .
9+
10+
RUN npm install --frozen-lockfile
11+
12+
ENTRYPOINT [ "/usr/local/bin/node" ]
13+
CMD [ "./index.js" ]

0 commit comments

Comments
 (0)