Browse Source

Merge pull request #22 from oofnikj/dockerize

Add Docker build
Toni 1 year ago
parent
commit
521ee3bb83
2 changed files with 20 additions and 0 deletions
  1. 3 0
      .dockerignore
  2. 17 0
      Dockerfile

+ 3 - 0
.dockerignore

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

+ 17 - 0
Dockerfile

@@ -0,0 +1,17 @@
+FROM alpine AS build
+RUN apk update && apk add \
+    musl-dev \
+    autoconf \
+    automake \
+    make \
+    gcc \
+    tini
+COPY . /build
+WORKDIR /build
+RUN autoreconf -fi && ./configure && make
+RUN make DESTDIR=/opt install
+
+FROM alpine
+COPY --from=build /opt /
+COPY --from=build /sbin/tini /sbin/tini
+ENTRYPOINT ["/sbin/tini", "/usr/local/bin/ptunnel-ng"]