forked from goofball222/stunnel
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
60 lines (53 loc) · 1.59 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM alpine:3.19.1
ARG STUNNEL_VERSION
ARG IMAGE_VERSION
ARG BUILD_DATE
ARG VCS_REF
RUN set -x \
&& addgroup -S stunnel \
&& adduser -S -G stunnel stunnel \
&& apk update \
&& apk add --update --no-cache \
ca-certificates \
gettext \
libintl \
openssl-dev \
wget \
build-base \
linux-headers \
openssl \
&& cp -v /usr/bin/envsubst /usr/local/bin/ \
&& apk del --purge gettext \
&& mkdir -p /tmp/src \
&& cd /tmp/src \
&& wget https://www.stunnel.org/downloads/stunnel-${STUNNEL_VERSION}.tar.gz \
&& tar -zxvf stunnel-${STUNNEL_VERSION}.tar.gz \
&& cd stunnel-${STUNNEL_VERSION} \
&& ./configure \
&& make \
&& make install \
&& apk del --purge \
openssl-dev \
wget \
build-base \
linux-headers \
&& rm -rf /var/cache/apk /tmp/src \
&& apk --no-network info openssl
COPY *.template openssl.cnf /srv/stunnel/
COPY entrypoint.sh /srv/
RUN set -x \
&& chmod +x /srv/entrypoint.sh \
&& mkdir -p /var/run/stunnel /etc/stunnel \
&& chown -vR stunnel:stunnel /var/run/stunnel
ENTRYPOINT ["/srv/entrypoint.sh"]
CMD ["stunnel", "/etc/stunnel/stunnel.conf"]
LABEL \
org.label-schema.vendor="Inveniem" \
org.label-schema.url="https://github.com/inveniem/stunnel" \
org.label-schema.name="STunnel Docker Container" \
org.label-schema.version=$IMAGE_VERSION \
org.label-schema.vcs-url="https://github.com/inveniem/stunnel.git" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.license="MIT" \
org.label-schema.schema-version="1.0"