forked from ghostunnel/ghostunnel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (21 loc) · 772 Bytes
/
Dockerfile
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
# Dockerfile for ghostunnel/ghostunnel, useful as a basis for other images.
#
# To build this image:
# docker build -t ghostunnel/ghostunnel .
#
# To run ghostunnel from the image (for example):
# docker run --rm ghostunnel/ghostunnel --version
FROM golang:1.18-alpine as build
# Dependencies
RUN apk add --no-cache --update gcc musl-dev libtool make git
# Copy source
COPY . /go/src/github.com/ghostunnel/ghostunnel
# Build
RUN cd /go/src/github.com/ghostunnel/ghostunnel && \
GO111MODULE=on make clean ghostunnel && \
cp ghostunnel /usr/bin/ghostunnel
# Create a multi-stage build with the binary
FROM alpine
RUN apk add --no-cache --update libtool curl
COPY --from=build /usr/bin/ghostunnel /usr/bin/ghostunnel
ENTRYPOINT ["/usr/bin/ghostunnel"]