Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Alpine for Base #70

Merged
merged 4 commits into from
Oct 4, 2015
Merged

Switch to Alpine for Base #70

merged 4 commits into from
Oct 4, 2015

Conversation

kylemanna
Copy link
Owner

Stumbled on Alpine the other day and it significantly reduces the size of the Docker image. (150 -> 12MB).

I'm running it on three of my existing personal VPNs without issue. To use it with systemd it's as simple as installing the systemd service file and then overriding the image with something like.

# /etc/systemd/system/[email protected]/local.conf
Environment="IMG=kylemanna/openvpn:alpine"

Run systemd daemon-reload and then restart the service.

Random babbling on my blog

Thanks to @tsing I was able to pull in the EasyRSA package which should include package signature verification at @ypid's request.

* Debian Jessie -> Alpine 3.2: 150MB -> 15MB
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 && \
ln -s /usr/local/share/easy-rsa/easyrsa3/easyrsa /usr/local/bin
RUN echo "http:https://dl-4.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories && \
apk add --update openvpn iptables curl bash easy-rsa && \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the curl is not really used ?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. After your testing/EasyRSA it's unneeded. Let me fix this.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path needs fixing

docker run --volumes-from ovpn-data --rm -it kylemanna/openvpn:alpine ovpn_initpki
/usr/local/bin/ovpn_initpki: line 19: easyrsa: command not found

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My fault again for not testing. 😳 Added a symlink and updated the EasyRSA environment.

Thanks for testing!

* Simplifes the Dockerfile significantly.
* No need for curl.
@kylemanna
Copy link
Owner Author

This has been sitting quiet for a while. Just tagged v1.1.0 on current master (Docker Hub tag: 1.1.0).

Thinking about merging in the next few days. The Travis-CI tests tell me it works. 👍

If things went sideways people could use the 1.1.0 tag while master resolves any last minute surprises.

Thoughts?

kylemanna added a commit that referenced this pull request Oct 4, 2015
Switch to Alpine for Base
@kylemanna kylemanna merged commit 98cf212 into master Oct 4, 2015
@kylemanna kylemanna deleted the alpine branch June 1, 2016 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants