Warning
I found this better image by hawkmoth-studio. Please use this one instead!
This image provides a simple way to get started with a Helix Core Server (Perforce).
services:
perforce:
image: jakobbouchard/helix-core-server:latest
ports:
- "1666:1666"
environment:
P4ROOT: /opt/perforce/root
P4SSLDIR: /opt/perforce/ssl
P4JOURNAL: /opt/perforce/journals/journal
P4PORT: 1666
volumes:
- ./data:/opt/perforce
restart: unless-stopped
services:
perforce:
image: jakobbouchard/helix-core-server:latest
ports:
- "1666:1666"
environment:
SSL_COUNTRY: CA
SSL_STATE: Quebec
SSL_LOCALITY: Montreal
SSL_ORGANIZATION: Organization
SSL_ORGANIZATIONAL_UNIT: DevOps
SSL_COMMON_NAME: localhost # must be a valid hostname
SSL_EXPIRY: 365 # days
P4ROOT: /opt/perforce/root
P4SSLDIR: /opt/perforce/ssl
P4JOURNAL: /opt/perforce/journals/journal
P4PORT: ssl:1666
volumes:
- ./data:/opt/perforce
restart: unless-stopped
Helix Core Server does not create a user by default. You will want to connect to the container's shell and run the following to create your first user:
p4 user -f <username>
Once that's done, login using P4Admin and enter your server URL (e.g. ssl:localhost:1666
and your username. Once that's done, it will ask you if you want to be the sole super-user. Click Yes, then restart P4Admin, it should reconnect to the server and you'll see your server info and be able to manage it now.
I highly recommend setting up a cron job on your host OS that looks something like the following, so that your journals are rotated and checkpointed.
0 0 * * 1-6 docker exec perforce bash /app/rotate-journal.sh
0 0 * * 0 docker exec perforce bash /app/checkpoint-journal.sh
Please follow the Perforce instructions and then start the container. I am not responsible for any loss of data that may occur, and you should always have proper backups.