-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
23 lines (19 loc) · 1.3 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM alpine:3.6
MAINTAINER pancho horrillo <[email protected]>
COPY version.go /tmp/sandbox/
RUN set -e; \
USER=ryanchapman; \
PROJECT=go-any-proxy; \
PACKAGES='ca-certificates git go gcc musl-dev'; \
apk add --no-cache $PACKAGES; \
SANDBOX=/tmp/sandbox; \
mkdir -p "$SANDBOX"; \
git clone --depth 1 https://github.com/"$USER/$PROJECT".git "$SANDBOX/$PROJECT"; \
mv "$SANDBOX"/version.go "$SANDBOX/$PROJECT"; \
export GOPATH="$SANDBOX/go" GOBIN=/; \
go get github.com/zdannar/flogger; \
go install -ldflags '-s' ."$SANDBOX/$PROJECT"; \
rm -rf "$SANDBOX"; \
apk del $PACKAGES
EXPOSE 53
ENTRYPOINT ["/go-any-proxy"]