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

Also support (and test) deployment using podman #438

Open
pombredanne opened this issue May 28, 2024 · 3 comments
Open

Also support (and test) deployment using podman #438

pombredanne opened this issue May 28, 2024 · 3 comments
Assignees

Comments

@pombredanne
Copy link
Member

We should also support (and test) deployment using podman and other container runners, beyond docker.

@JonoYang
Copy link
Contributor

These are the steps I have taken to install podman on a fresh install of debian testing:

  1. Install podman, podman-compose, and podman-docker

    • sudo apt-get install podman podman-compose podman-docker

    This will also install docker-compose

  2. Create and start podman user service for rootless podman

    • systemctl --user enable podman --now

    This sets up a podman socket that is accessible by the user without using root.

  3. Add the following lines to /etc/sysctl.conf

    • net.ipv4.ip_unprivileged_port_start=80
      • This is to allow rootless containers to use ports 80 and above. By default, rootless containers cannot use ports lower than 1024.
    • vm.overcommit_memory=1
      • Redis displays a warning message that says to add this to /etc/sysctl.conf when the container is launched.
  4. Add the following lines to /etc/containers/registries.conf

    • unqualified-search-registries = ["docker.io"]

    This adds docker.io as a source to pull images from.

  5. You may have to set DOCKER_HOST environment variable for some tools

    • unix:///var/run/user/1000/podman/podman.sock

    This assumes that there is only one user on the system.

@JonoYang
Copy link
Contributor

I get this error when I try to run docker compose up after running docker compose build:

$ docker compose up
>>>> Executing external compose provider "/usr/bin/docker-compose". Please refer to the documentation for details. <<<<

ERROR: The Compose file './docker-compose.yml' is invalid because:
'include' does not match any of the regexes: '^x-'

You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/
Error: executing /usr/bin/docker-compose up: exit status 1

The old docker-compose Python script is being used, which does not support the newer Compose file specs.

@JonoYang
Copy link
Contributor

Installing the latest version of podman-compose from GitHub with pip install https://github.com/containers/podman-compose/archive/refs/tags/v1.1.0.tar.gz resolves this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants