hwdsl2 / docker-ipsec-vpn-server

Docker image to run an IPsec VPN server, with IPsec/L2TP, Cisco IPsec and IKEv2
https://hub.docker.com/r/hwdsl2/ipsec-vpn-server
Other
6.47k stars 1.39k forks source link

Use Alpine Linux build docker image #239

Closed peterwillcn closed 3 years ago

peterwillcn commented 3 years ago

Use Alpine Linux build docker image, It can reduce the size of the image.

hwdsl2 commented 3 years ago

@peterwillcn Hello! Thank you for your suggestion. Currently, this project uses the Debian Buster "slim" base image, and the built image has a compressed size of ~65MB on Docker Hub. The build process was optimized to keep the image size small.

Switching to using the Alpine Linux base image could further reduce image size as you mentioned. However, unfortunately I think Alpine Linux does not currently provide all the necessary packages required to build the latest Libreswan version (4.4 as of today) from source. As an alternative, Libreswan can be installed from the Alpine Linux repositories, but using that approach may require a major rewrite of this project, which I don't currently have time for.