-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (21 loc) · 724 Bytes
/
Dockerfile
File metadata and controls
23 lines (21 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM golang:alpine AS builder
ARG PTZTAG
ARG TARGETOS
ARG TARGETARCH
ENV GOPATH=/go
ENV GOOS=$TARGETOS
ENV GOARCH=$TARGETARCH
WORKDIR /
RUN apk add --no-cache git
RUN git clone --depth 1 --branch ${PTZTAG} https://github.com/pritunl/pritunl-zero.git /go/src/github.com/pritunl/pritunl-zero && \
cd /go/src/github.com/pritunl/pritunl-zero && \
go build -o /go/bin/pritunl-zero .
FROM alpine
WORKDIR /root/go/
ARG MONGO_URI
ARG BASTION_IMAGE
ADD docker-entrypoint.sh /root/
COPY --from=builder /go/bin /root/go/bin
COPY --from=builder /go/src/github.com/pritunl/pritunl-zero/www /root/go/src/github.com/pritunl/pritunl-zero/www
RUN apk add --no-cache libc6-compat docker-cli
ENTRYPOINT ["/root/docker-entrypoint.sh"]