forked from juanfont/headscale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.alpine
37 lines (23 loc) · 1.17 KB
/
Dockerfile.alpine
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
FROM golang:1.21.4-alpine3.18@sha256:110b07af87238fbdc5f1df52b00927cf58ce3de358eeeb1854f10a8b5e5e1411 AS build
WORKDIR /go/src/github.com/juanfont/headscale/
ARG BUILD_VERSION
COPY . .
RUN test -n "${BUILD_VERSION}" \
&& apk update \
&& apk upgrade -a \
&& apk add --no-cache ca-certificates curl gcc musl-dev \
&& update-ca-certificates \
&& CGO_ENABLED=0 go build -o ./headscale -v -trimpath -ldflags="-s -w -X github.com/juanfont/headscale/cmd/headscale/cli.Version=${BUILD_VERSION}" ./cmd/headscale
WORKDIR /config
FROM alpine:3.18.4@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978
LABEL org.opencontainers.image.title="quay.io/rapyuta/rr-headscale"
LABEL org.opencontainers.image.description="An open source, self-hosted implementation of the Tailscale coordination server."
RUN apk update && apk upgrade -a && apk add inotify-tools
COPY --from=build /etc/ssl/certs /etc/ssl/certs
COPY --from=build /go/src/github.com/juanfont/headscale/headscale /usr/local/bin/headscale
COPY --from=build /config /config
COPY ./hack/acl_watcher.sh ./hack/start.sh .
RUN chmod +x start.sh acl_watcher.sh
EXPOSE 8080/tcp
ENTRYPOINT [ "./start.sh" ]
CMD ["help"]