This commit is contained in:
Odyssey
2022-12-03 19:22:11 +01:00
2 changed files with 18 additions and 0 deletions
+4
View File
@@ -20,6 +20,7 @@ pipeline:
from_secret: passwd
# password = key or actual password
tags: latest
dockerfile: Dockerfile-arm64
dockerize-arm64:
environment:
@@ -59,6 +60,7 @@ pipeline:
dockerize-dev-arm64:
environment:
- ARCH=
- GOOS=linux
- GOARCH=arm64
when:
@@ -74,3 +76,5 @@ pipeline:
from_secret: passwd
# password = key or actual password
tags: ${CI_COMMIT_SHA:0:8}-arm64
dockerfile: Dockerfile-arm64
# You can thank the drone docker maintainer for not providing a buildx option.
+14
View File
@@ -0,0 +1,14 @@
FROM arm64v8/golang:alpine AS build
WORKDIR /app
RUN apk add --no-cache git
RUN git clone https://codeberg.org/gothub/gothub .
RUN go mod download
RUN go build -ldflags "-X codeberg.org/gothub/gothub/pages.Version=$(git rev-parse --short HEAD)"
FROM arm64v8/alpine:${ARCH} AS bin
WORKDIR /app
COPY --from=build /app/gothub .
COPY --from=build /app/public .
COPY --from=build /app/views .
CMD ["./gothub serve"]
EXPOSE 3000