Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/release-notes/12545-podman-support-dev-env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add Podman support for developmental docker compose environment. See #12545
30 changes: 27 additions & 3 deletions doc/sphinx-guides/source/developers/dev-environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@ 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 <https://github.com/IQSS/dataverse>`_, run this:

``mvn -Pct clean package docker:run``

(Note that if you are Windows, you must run the command above in `WSL <https://learn.microsoft.com/windows/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
Expand Down Expand Up @@ -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
~~~~~~~~~~~~~~

Expand All @@ -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
~~~~~~

Expand Down
18 changes: 11 additions & 7 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -290,4 +294,4 @@ services:

networks:
dataverse:
driver: bridge
driver: bridge