alpine: Use alpine as base image instead of Debian
* Debian Jessie -> Alpine 3.2: 150MB -> 15MB
This commit is contained in:
parent
314eb15507
commit
3da0efa5bc
13
Dockerfile
13
Dockerfile
@ -1,16 +1,17 @@
|
|||||||
# Original credit: https://github.com/jpetazzo/dockvpn
|
# Original credit: https://github.com/jpetazzo/dockvpn
|
||||||
|
|
||||||
# Leaner build then Ubunutu
|
# Leaner build then Ubunutu
|
||||||
FROM debian:jessie
|
FROM alpine:3.2
|
||||||
|
|
||||||
MAINTAINER Kyle Manna <kyle@kylemanna.com>
|
MAINTAINER Kyle Manna <kyle@kylemanna.com>
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apk update && \
|
||||||
apt-get install -y openvpn iptables curl && \
|
apk add openvpn iptables curl bash && \
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
rm -rf /tmp/* /var/tmp/* /var/cache/apk/*
|
||||||
|
|
||||||
RUN mkdir -p /usr/local/share/easy-rsa && \
|
RUN mkdir -p /usr/local/share/easy-rsa && cd /usr/local/share/easy-rsa && \
|
||||||
curl -L https://github.com/OpenVPN/easy-rsa/archive/v3.0.0.tar.gz | tar xzf - --strip=1 -C /usr/local/share/easy-rsa easy-rsa-3.0.0/easyrsa3 && \
|
curl -L https://github.com/OpenVPN/easy-rsa/archive/v3.0.0.tar.gz | tar xzf - easy-rsa-3.0.0/easyrsa3 && \
|
||||||
|
mv easy-rsa-3.0.0/easyrsa3 . && rmdir easy-rsa-3.0.0 && \
|
||||||
ln -s /usr/local/share/easy-rsa/easyrsa3/easyrsa /usr/local/bin
|
ln -s /usr/local/share/easy-rsa/easyrsa3/easyrsa /usr/local/bin
|
||||||
|
|
||||||
# Needed by scripts
|
# Needed by scripts
|
||||||
|
Loading…
Reference in New Issue
Block a user