Deploy a Nexus3 in container on VM
Load the image
1podman pull sonatype/nexus3:3.59.0
2podman save sonatype/nexus3:3.59.0 -o nexus3.tar
3podman load < nexus3.tar
Create a service inside /etc/systemd/system/container-nexus3.service
with content below:
1[Unit]
2Description=Nexus Podman container
3Wants=syslog.service
4
5[Service]
6User=nexus-system
7Group=nexus-system
8Restart=always
9ExecStart=/usr/bin/podman run \
10 --log-level=debug \
11 --rm \
12 -ti \
13 --publish 8081:8081 \
14 --name nexus \
15 sonatype/nexus3:3.59.0
16
17ExecStop=/usr/bin/podman stop -t 10 nexus
18
19[Install]
20WantedBy=multi-user.target
Comments