-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
13 lines (12 loc) · 591 Bytes
/
Dockerfile
File metadata and controls
13 lines (12 loc) · 591 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
FROM golang:1.20.1-alpine3.17 AS BUILD_IMAGE
RUN apk add --update --no-cache curl
WORKDIR /go/src/github.com/schollz/croc
COPY croc.version .
RUN curl -#L -o croc.tar.gz https://api.github.com/repos/schollz/croc/tarball/v$(cat croc.version) && \
tar -xzf croc.tar.gz --strip 1 && \
go get -d && \
go build -ldflags="-s -w" -o /usr/bin/croc
FROM alpine:3.17.2
RUN apk add --update --no-cache tini
COPY --from=BUILD_IMAGE /usr/bin/croc /usr/bin/croc
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/croc"]