-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (31 loc) · 1.08 KB
/
Dockerfile
File metadata and controls
41 lines (31 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
##############################
# Builder
##############################
FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS build
WORKDIR /cmd
ARG TARGETOS TARGETARCH
RUN --mount=target=. \
--mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg \
GOOS=$TARGETOS GOARCH=$TARGETARCH go build \
-o /out/hachyboop cmd/*.go
##############################
# Runtime image
##############################
FROM alpine
COPY --from=build /out/hachyboop /bin
# Envvars
ENV HACHYBOOP_OBSERVER_ID=anonymous-hachyfriend
ENV HACHYBOOP_OBSERVER_REGION=analog-nowhere
ENV HACHYBOOP_RESOLVERS=91.200.176.1:53,8.8.8.8:53
ENV HACHYBOOP_QUESTIONS=hachyderm.io
ENV HACHYBOOP_S3_WRITER_ENABLED=false
ENV HACHYBOOP_S3_ENDPOINT=replace-me.local
ENV HACHYBOOP_S3_BUCKET=replace-me
ENV HACHYBOOP_S3_PATH=replace-me/with-something
ENV HACHYBOOP_S3_ACCESS_KEY_ID=replace-me
ENV HACHYBOOP_S3_SECRET_ACCESS_KEY=replace-me
ENV HACHYBOOP_LOCAL_WRITER_ENABLED=true
ENV HACHYBOOP_LOCAL_RESULTS_PATH=data
ENV HACHYBOOP_TEST_FREQUENCY_SECONDS=300
ENTRYPOINT [ "/bin/hachyboop" ]