mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-01-14 00:17:27 +00:00
Adds /pkg/vpnkit-forwarder which downloads and builds vpnkit-forwarder and vpnkit-expose-port from moby/vpnkit. Also includes an example for forwarding `sshd` and updates the documentation for `hyperkit` to include a `vpnkit` section. `vpnkit` still requires a 9P mount for coordination, so the `socat` forwarding is simpler to set up at the moment. Signed-off-by: Magnus Skjegstad <magnus@skjegstad.com>
17 lines
641 B
Docker
17 lines
641 B
Docker
FROM linuxkit/alpine:630ee558e4869672fae230c78364e367b8ea67a9 AS mirror
|
|
|
|
RUN apk add --no-cache go musl-dev git build-base
|
|
ENV GOPATH=/go PATH=$PATH:/go/bin
|
|
ENV COMMIT=2d6d82167cf81c665c05d1425a79adfbc1a71177
|
|
|
|
RUN git clone https://github.com/moby/vpnkit.git /go/src/github.com/moby/vpnkit && \
|
|
cd /go/src/github.com/moby/vpnkit && \
|
|
git checkout $COMMIT && \
|
|
cd go && \
|
|
make all
|
|
|
|
FROM scratch
|
|
COPY --from=mirror /go/src/github.com/moby/vpnkit/go/build/vpnkit-forwarder.linux /vpnkit-forwarder
|
|
COPY --from=mirror /go/src/github.com/moby/vpnkit/go/build/vpnkit-expose-port.linux /vpnkit-expose-port
|
|
CMD ["/vpnkit-forwarder"]
|