File tree Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Original file line number Diff line number Diff line change @@ -24,10 +24,22 @@ jobs:
24
24
-
25
25
name : Available platforms
26
26
run : echo ${{ steps.buildx.outputs.platforms }}
27
+ -
28
+ name : docker login
29
+ env :
30
+ DOCKER_USER : ${{secrets.DOCKER_USER}}
31
+ DOCKER_PASSWORD : ${{secrets.DOCKER_PASSWORD}}
32
+ run : |
33
+ docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
27
34
-
28
35
name : Run Buildx
29
36
run : |
30
37
docker buildx build \
31
38
--platform linux/amd64,linux/arm64 \
32
- --output "type=image,push=false" \
33
- --file ./Dockerfile .
39
+ --output "type=image,push=true" \
40
+ --file ./Dockerfile \
41
+ --tag $GITHUB_REPOSITORY:$GITHUB_SHA \
42
+ --tag $GITHUB_REPOSITORY:latest .
43
+
44
+
45
+
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ RUN set -ex \
52
52
py3-setuptools \
53
53
scapy \
54
54
socat \
55
+ speedtest-cli \
55
56
strace \
56
57
tcpdump \
57
58
tcptraceroute \
Original file line number Diff line number Diff line change
1
+ .PHONY : build-x86 build-arm64 push all
2
+
3
+ # Build Vars
4
+ IMAGENAME =nicolaka/netshoot
5
+ VERSION =0.1
6
+
7
+
8
+ .DEFAULT_GOAL := all
9
+
10
+ build-x86 :
11
+ @docker build --platform linux/amd64 -t ${IMAGENAME} :${VERSION} .
12
+ build-arm64 :
13
+ @docker build --platform linux/arm64 -t ${IMAGENAME} :${VERSION} .
14
+ build-all :
15
+ @docker buildx build --platform linux/amd64,linux/arm64 --output " type=image,push=false" --file ./Dockerfile .
16
+ push :
17
+ @docker push ${IMAGENAME} :${VERSION}
18
+ all : build-all push
19
+
20
+
21
+
You can’t perform that action at this time.
0 commit comments