-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
60 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Dockerhub ARM64 | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
REPOSITORY: stressbox:arm64 | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./app | ||
steps: | ||
- uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: 'arm64,arm' | ||
- uses: actions/checkout@v4 | ||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile.arm64v8 --tag $REPOSITORY | ||
|
||
- uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- run: | | ||
docker tag $REPOSITORY epomatti/$REPOSITORY | ||
docker push epomatti/$REPOSITORY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
|
||
|
||
FROM golang:1.21-alpine AS builder | ||
|
||
WORKDIR /build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# https://github.com/golang/go/wiki/GoArm | ||
# https://hub.docker.com/r/arm64v8/alpine/tags | ||
FROM arm64v8/golang:1.21-alpine AS builder | ||
|
||
WORKDIR /build | ||
COPY . . | ||
RUN go mod download | ||
RUN go build . | ||
|
||
FROM arm64v8/golang:1.21-alpine | ||
|
||
# curl added only for health check if anyone needs it | ||
RUN apk update && apk add curl | ||
WORKDIR /app | ||
COPY --from=builder /build/stressbox . | ||
|
||
ENTRYPOINT ["/app/stressbox"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters