diff --git a/doc/release-notes/12545-podman-support-dev-env b/doc/release-notes/12545-podman-support-dev-env new file mode 100644 index 00000000000..2ae3b3a3e6e --- /dev/null +++ b/doc/release-notes/12545-podman-support-dev-env @@ -0,0 +1 @@ +Add Podman support for developmental docker compose environment. See #12545 diff --git a/doc/sphinx-guides/source/developers/dev-environment.rst b/doc/sphinx-guides/source/developers/dev-environment.rst index e9796072054..bece5b7c241 100755 --- a/doc/sphinx-guides/source/developers/dev-environment.rst +++ b/doc/sphinx-guides/source/developers/dev-environment.rst @@ -12,7 +12,7 @@ These instructions are oriented around Docker but the "classic" instructions we Quickstart ---------- -First, install Java 21, Maven, and Docker. +First, install Java 21, Maven, and Docker or Podman. After cloning the `dataverse repo `_, run this: @@ -20,6 +20,11 @@ After cloning the `dataverse repo `_, run thi (Note that if you are Windows, you must run the command above in `WSL `_ rather than cmd.exe. See :doc:`windows`.) +If using Podman, assuming ``podman.sock`` is located at ``/run/user/1000/podman/podman.sock`` +and a symlink ``docker`` pointing to ``podman`` executable exists, run this: + +``DOCKER_HOST=unix:///run/user/1000/podman/podman.sock mvn -Pct clean package docker:run`` + After some time you should be able to log in: - url: http://localhost:8080 @@ -49,13 +54,27 @@ If you are using SKDMAN, run this command: Otherwise, follow instructions at https://maven.apache.org. -Install and Start Docker -~~~~~~~~~~~~~~~~~~~~~~~~ +Install and Start Docker/Podman +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Follow instructions at https://www.docker.com Be sure to start Docker. +For Podman, follow instructions at https://podman.io/docs/installation. Once Podman is +installed, ensure to start Podman socket service. This can be verified by running +``podman info`` command in the output look for the following output: + +.. code-block:: yaml + + remoteSocket: + exists: true + path: /run/user/1000/podman/podman.sock + +In case if exists is ``false``, start the socket using command ``systemctl --user start podman.socket``. +To ensure the socket service starts automatically on system boot, run ``systemctl --user enable podman.socket``. +Finally, create a symlink named ``docker`` pointing to ``podman`` executable as ``ln -s /usr/bin/podman /usr/bin/docker``. + Git Clone Repo ~~~~~~~~~~~~~~ @@ -70,6 +89,11 @@ Change into the ``dataverse`` directory you just cloned and run the following co ``mvn -Pct clean package docker:run`` +In the case of Podman, if ``podman.sock`` is running at ``/run/user/1000/podman/podman.sock``, the +command becomes: + +``DOCKER_HOST=unix:///run/user/1000/podman/podman.sock mvn -Pct clean package docker:run`` + Verify ~~~~~~ diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index c176597c990..a08b80fbd38 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -21,6 +21,7 @@ services: DATAVERSE_FEATURE_API_BEARER_AUTH_PROVIDE_MISSING_CLAIMS: "1" DATAVERSE_MAIL_SYSTEM_EMAIL: "dataverse@localhost" DATAVERSE_MAIL_MTA_HOST: "smtp" + DATAVERSE_MAIL_MTA_PORT: "1025" DATAVERSE_AUTH_OIDC_ENABLED: "1" DATAVERSE_AUTH_OIDC_HIDDEN_JSF: "1" DATAVERSE_AUTH_OIDC_CLIENT_ID: test @@ -82,8 +83,11 @@ services: - ./docker-dev-volumes/app/secrets:/secrets - ./target/dataverse:/opt/payara/deployments/dataverse:ro tmpfs: - - /dumps:mode=770,size=2052M,uid=1000,gid=1000 - - /tmp:mode=770,size=2052M,uid=1000,gid=1000 + # Podman does not support uid and gid options for tmpfs and to maintain a single + # compose file for Docker and Podman, uid and gid have been omitted. As it is + # a dev environment, the risk introduced is minimal by removing these options. + - /dumps:mode=1777,size=2052M #,uid=1000,gid=1000 + - /tmp:mode=1777,size=2052M #,uid=1000,gid=1000 mem_limit: 2684354560 # 2.5 GiB mem_reservation: 1024m privileged: false @@ -185,17 +189,17 @@ services: image: maildev/maildev:2.0.5 restart: on-failure ports: - - "25:25" # smtp server + - "1025:1025" # smtp server - "1080:1080" # web ui environment: - - MAILDEV_SMTP_PORT=25 + - MAILDEV_SMTP_PORT=1025 - MAILDEV_MAIL_DIRECTORY=/mail networks: - dataverse #volumes: # - ./docker-dev-volumes/smtp/data:/mail tmpfs: - - /mail:mode=770,size=128M,uid=1000,gid=1000 + - /mail:mode=1777,size=128M #,uid=1000,gid=1000 dev_keycloak: container_name: "dev_keycloak" @@ -250,7 +254,7 @@ services: volumes: - ./conf/localstack:/etc/localstack/init/ready.d tmpfs: - - /localstack:mode=770,size=128M,uid=1000,gid=1000 + - /localstack:mode=1777,size=128M #,uid=1000,gid=1000 previewers-provider: container_name: previewers-provider @@ -290,4 +294,4 @@ services: networks: dataverse: - driver: bridge \ No newline at end of file + driver: bridge