Skip to content

Instantly share code, notes, and snippets.

@Viranchee
Created September 20, 2020 14:50
Show Gist options
  • Save Viranchee/d6d16bf8d32f1bbf6a5de2376e38e292 to your computer and use it in GitHub Desktop.
Save Viranchee/d6d16bf8d32f1bbf6a5de2376e38e292 to your computer and use it in GitHub Desktop.
Hera - Working RaspberryPi Armv7 armhf Argo Tunnel Helper
version: "3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
hera:
container_name: hera
build:
context: ./hera
dockerfile: Dockerfile.armhf
network_mode: hera
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ~/.cloudflared/cert.pem:/certs/cert.pem
- ~/heralogs:/var/log/hera
- ~/docker/cloudflare/cloudflared:/bin/cloudflared
## Builder image
FROM arm32v7/golang:1.14-alpine AS builder
RUN apk add --no-cache ca-certificates git
WORKDIR /src
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
# not needed GOARCH=arm GOARM=7, it will be auto-set correctly if building on the target machine
RUN CGO_ENABLED=0 go build -o /dist/hera
## Final image
FROM alpine:3.11
RUN apk add --no-cache ca-certificates curl gcompat
RUN curl -L -s https://github.com/just-containers/s6-overlay/releases/download/v1.22.1.0/s6-overlay-armhf.tar.gz \
| tar xvzf - -C /
RUN apk del --no-cache curl
COPY --from=builder /dist/hera /bin/
COPY rootfs /
ENTRYPOINT ["/init"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment