File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish Docker Image - Ubuntu
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ tags :
8+ - " v*.*.*"
9+ workflow_dispatch :
10+
11+ jobs :
12+ build-and-push :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Docker meta
16+ id : meta
17+ uses : docker/metadata-action@v5
18+ with :
19+ # list of Docker images to use as base name for tags
20+ images : |
21+ tagyoureit/njspc-dashpanel
22+ # generate Docker tags based on the following events/attributes
23+ tags : |
24+ type=schedule
25+ type=ref,event=branch
26+ type=ref,event=pr
27+ type=semver,pattern={{version}}
28+ type=semver,pattern={{major}}.{{minor}}
29+ type=semver,pattern={{major}}
30+ type=sha
31+
32+ - name : Set up QEMU
33+ uses : docker/setup-qemu-action@v3
34+
35+ - name : Set up Docker Buildx
36+ uses : docker/setup-buildx-action@v3
37+
38+ - name : Login to Docker Hub
39+ uses : docker/login-action@v3
40+ with :
41+ username : ${{ secrets.DOCKERHUB_USERNAME }}
42+ password : ${{ secrets.DOCKERHUB_TOKEN }}
43+
44+ - name : Build and push combined Docker image
45+ uses : docker/build-push-action@v6
46+ with :
47+ push : true
48+ platforms : linux/amd64,linux/arm64,linux/arm/v7
49+ tags : ${{ steps.meta.outputs.tags }}
50+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1- FROM node:lts -alpine as build
1+ FROM node:18 -alpine as build
22RUN apk add --no-cache make gcc g++ python3 linux-headers udev tzdata
33WORKDIR /app
44COPY package*.json ./
@@ -7,11 +7,12 @@ COPY . .
77RUN npm run build
88RUN npm ci --production
99
10- FROM node:lts -alpine
10+ FROM node:18 -alpine
1111RUN apk add git
1212RUN mkdir /app && chown node:node /app && mkdir /app/data && chown node:node /app/data
1313WORKDIR /app
1414COPY --chown=node:node --from=build /app .
1515USER node
1616ENV NODE_ENV=production
17+ EXPOSE 4200
1718ENTRYPOINT ["node" , "dist/app.js" ]
You can’t perform that action at this time.
0 commit comments