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 : Build golang-121
2- on :
3- workflow_dispatch :
4- push :
5- branches :
6- - main
7- paths :
8- - golang/golang-121/*
9- - golang/entrypoint.sh
10- - .github/workflows/golang-121.yml
11- jobs :
12- push :
13- name : " golang-121"
14- runs-on : ubuntu-latest
15- steps :
16- - uses : actions/checkout@v3
17- - uses : docker/setup-buildx-action@v2
18- with :
19- version : " v0.9.1"
20- buildkitd-flags : --debug
21- - uses : docker/login-action@v2
22- with :
23- registry : ghcr.io
24- username : ${{ github.repository_owner }}
25- password : ${{ secrets.GITHUB_TOKEN }}
26- - uses : docker/build-push-action@v3
27- with :
28- context : ./golang
29- file : ./golang/golang-121/Dockerfile
30- platforms : linux/amd64
31- push : true
32- tags : |
33- ghcr.io/sparkedhost/images:golang-121
1+ name : Build Go Images
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - main
8+ paths :
9+ - " golang/**"
10+ - " .github/workflows/golang.yml"
11+
12+ jobs :
13+ build :
14+ name : " Go ${{ matrix.version }}"
15+ runs-on : ubuntu-latest
16+ strategy :
17+ fail-fast : false
18+ matrix :
19+ version :
20+ - 121
21+ - 124
22+
23+ steps :
24+ - uses : actions/checkout@v3
25+ - uses : docker/setup-buildx-action@v2
26+ with :
27+ version : " v0.9.1"
28+ buildkitd-flags : --debug
29+ - uses : docker/login-action@v2
30+ with :
31+ registry : ghcr.io
32+ username : ${{ github.repository_owner }}
33+ password : ${{ secrets.GITHUB_TOKEN }}
34+ - uses : docker/build-push-action@v3
35+ with :
36+ context : ./golang
37+ file : ./golang/golang-${{ matrix.version }}/Dockerfile
38+ platforms : linux/amd64
39+ push : true
40+ tags : |
41+ ghcr.io/sparkedhost/images:golang-${{ matrix.version }}
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ FROM golang:1.21
77
88LABEL author="DevOps Team at Sparked Host" maintainer="devops@sparkedhost.com"
99
10+ RUN apt-get update -y \
11+ && apt-get install fontconfig iproute2 curl ca-certificates unzip tar jq -y \
12+ && useradd -d /home/container -m container
13+
1014USER container
1115ENV USER=container HOME=/home/container LANG=C.UTF-8
1216
Original file line number Diff line number Diff line change 1+ # ----------------------------------
2+ # Sparked Host Custom Docker Image
3+ # Image: ghcr.io/sparkedhost/images:golang-124
4+ # ----------------------------------
5+
6+ FROM golang:1.24
7+
8+ LABEL author="DevOps Team at Sparked Host" maintainer="devops@sparkedhost.com"
9+
10+ RUN apt-get update -y \
11+ && apt-get install fontconfig iproute2 curl ca-certificates unzip tar jq -y \
12+ && useradd -d /home/container -m container
13+
14+ USER container
15+ ENV USER=container HOME=/home/container LANG=C.UTF-8
16+
17+ WORKDIR /home/container
18+
19+ COPY ./entrypoint.sh /entrypoint.sh
20+
21+ CMD ["/bin/bash" , "/entrypoint.sh" ]
You can’t perform that action at this time.
0 commit comments