-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
EasyRSA Environment Settings do not apply #627
Comments
I'm unaware of any bugs after #620 Can you explain precisely what things failed when passed by environment. All environment variables can be overridden by docker. |
I passed |
If you ran that command as passed then the shell variable was expanded by your local shell and is most likely empty. Try again but escape the variable so it's interpreted in the docker container. Test with plain old docker since it docker-compose doesn't really matter here:
I'd recommend running
|
Thanks. My mistake. |
Reading and Following docker-compose documentation, I found that easyrsa is not taking environment variables that I have set.
Doing some search, there was some issues with easyrsa ( OpenVPN/easyrsa#111 ) and it was fixed at the latest revision of easyrsa.
Bypassing the bug
vars.example
file to OpenVPN config folder (where host volumes are attached)vars.example
file tovar
, and edit it for your styleRemember : EASYRSA_VARS_FILE will be read in docker container, so set the file path in docker side
I ran
export EASYRSA_VARS_FILE=/etc/openssl/vars
since thevars
file was at the root of the config folder (data/conf/vars
on the host side)ovpn_genconfig
partdocker-openvpn/ovpn_initpki
, run these commands withdocker-compose run --rm openvpn {COMMAND}
/etc/openvpn/easyrsa init-pki
/etc/openvpn/easyrsa build-ca
/etc/openvpn/easyrsa gen-dh
openvpn --genkey --secret /etc/openvpn/pki/ta.key
/etc/openvpn/easyrsa build-server-full "{THE_URL_THAT_YOU_USED_ON_OVPN_GENCONFIG}" nopass
/etc/openvpn/easyrsa gen-crl
docker-compose up -d
Fixing the bug
I'm nearly first to docker so I don't know how to fix it correctly. However, these were essential for fixing the bug.
vars
file for easyrsaThe text was updated successfully, but these errors were encountered: