Skip to content

Ubuntu22-compatible build (Dockerfile)#2649

Open
Zaburunier wants to merge 1 commit into
amnezia-vpn:devfrom
Zaburunier:build/ubuntu-22.04
Open

Ubuntu22-compatible build (Dockerfile)#2649
Zaburunier wants to merge 1 commit into
amnezia-vpn:devfrom
Zaburunier:build/ubuntu-22.04

Conversation

@Zaburunier
Copy link
Copy Markdown

A few latest releases of AmneziaVPN are incompatible with Ubuntu 22.04. I needed VPN for my home PC which runs exactly 22.04, so I made this Dockerfile to address the issue.

@Zaburunier
Copy link
Copy Markdown
Author

Zaburunier commented May 24, 2026

Things to note:

  1. At the moment, Qt official installer is used. This means, valid Qt account is required. This is done by sharing qtaccount.ini file with container via --mount=type=secret in Dockerfile. Also login/password can be passed as build arguments but this is insecure and thus disabled (commented out) by default.
  2. Since I don't have access to Amnezia's conan remote, I had to use the following workaround:
  • Prepare conan packages outside CMake build process using default remote conancenter (see stage 3 in Dockerfile)
  • Pass --no-remote to CMake build process to force local cache usage (see toolchain file in stage 5)
  1. This Dockerfile can be easily extended to any Linux distribution. The single distro-specific thing I used is apt-get. CMake and Ninja is taken from Qt installation. Some very old distro can be selected to provide widest possible compatibility range (glibc release etc.). The only question is: will it be useful for you?

@Zaburunier
Copy link
Copy Markdown
Author

Zaburunier commented May 24, 2026

Launch command example:

DOCKER_BUILDKIT=1 docker build --secret id=qt_credentials,src=$HOME/.local/share/Qt/qtaccount.ini --file docker/ubuntu-22.04.Dockerfile --tag amnezia-ubuntu22 .

Then, to retrieve installation package:

docker container create --name amnezia-ubuntu22-container amnezia-ubuntu22 .
docker container cp amnezia-ubuntu22-container:/dist/. ./.build-dockerfile/
docker container rm amnezia-ubuntu22-container

Do everything with a single command:

DOCKER_BUILDKIT=1 docker build --secret id=qt_credentials,src=$HOME/.local/share/Qt/qtaccount.ini --file docker/ubuntu-22.04.Dockerfile --tag amnezia-ubuntu22 --output=./.build-dockerfile/ .

@Zaburunier
Copy link
Copy Markdown
Author

I know that releases are currently built the other way, this is just draft from personal use case. I am totally open for discussion, maybe there is something I can be helpful with.

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.

1 participant