Jordan Sokolic 2 years ago
parent
commit
2995606f4d
3 changed files with 23 additions and 0 deletions
  1. 3 0
      .dockerignore
  2. 16 0
      Dockerfile
  3. 4 0
      docker-entrypoint.sh

+ 3 - 0
.dockerignore

@@ -0,0 +1,3 @@
+.dockerignore
+.git
+Dockerfile

+ 16 - 0
Dockerfile

@@ -0,0 +1,16 @@
+FROM alpine AS build
+RUN apk update && apk add \
+    musl-dev \
+    autoconf \
+    automake \
+    make \
+    gcc
+COPY . /build
+WORKDIR /build
+RUN autoreconf -fi && ./configure && make
+RUN make DESTDIR=/opt install
+
+FROM alpine
+COPY --from=build /opt /
+COPY docker-entrypoint.sh /
+ENTRYPOINT ["/docker-entrypoint.sh"]

+ 4 - 0
docker-entrypoint.sh

@@ -0,0 +1,4 @@
+#!/bin/sh
+set -e
+/usr/local/bin/ptunnel-ng "$@" &
+wait