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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/.env
**/.directory
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ubuntu:18.04

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && \
apt-get install -y wget gnupg2 curl apt-utils && \
wget -qO - https://package.perforce.com/perforce.pubkey | apt-key add - && echo 'deb http://package.perforce.com/apt/ubuntu bionic release' > /etc/apt/sources.list.d/perforce.sources.list && \
apt-get update && apt-get install -y helix-p4d=2019.2-1942501~bionic && \
rm -rf /var/log/* && \
rm -rf /var/lib/apt/lists/*

VOLUME /opt/perforce/servers
VOLUME /opt/perforce/triggers

COPY run.sh /
CMD ["/run.sh"]
39 changes: 29 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,37 @@
> [!IMPORTANT]
>
> # **NOTICE:**
>
> ## Development of this project has been migrated to: https://codeberg.org/GlitchedPolygons/docker-perforce
>
> ## All pull requests and issues on GitHub will be ignored from the 16th of August, 2025 onwards.

docker-perforce
===============
[![License: MIT](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/noonien/docker-perforce-server/blob/master/LICENSE)

This is a collection of docker images to run products provided by [Perforce](http://www.perforce.com/).
Quick and easy way of setting up a Perforce Helix server using [docker-compose](https://docs.docker.com/compose/).

## How to get started

1. - Clone this repo
2. - Create a `.env` file inside the repo's root directory.
3. - Set the following environment variables to your desired values **(must be in `VARNAME=VALUE` format!)**.

Details
-------
This collection currently includes:
* **P4USER** - default is `p4admin`
* **P4PORT** - default is `ssl:1666`
* **P4PORTNUM** - default is `1666`
* * This should be the same number as the one used in your **P4PORT** string.
* **P4PASSWD** - Don't use a default value; please choose a super **strong** password!
* **P4DOCKERVOL** - default is `/mnt/dockervolumes/perforce`
* * This is where the docker volume will be mounted to on your host machine. Your entire perforce server instance lives inside there. It's therefore recommended to pick a path with abundant disk space...
* **SERVER_NAME** - default is `p4dsrv`

- [perforce-base](perforce-base) - Base container, includes the Perforce APT repositories.
- [perforce-server](perforce-server/) - Perforce Helix Server container.
4. - Open the p4d port (default is port number 1666)
5. - Install [Docker Engine](https://docs.docker.com/engine/install/) and [docker-compose](https://docs.docker.com/compose/install/) if you haven't already.
6. - run `sudo docker-compose up -d`

Your server should now be up and running, listening to the specified port, using the specified user credentials.

Contributing
------------
Contributing is always welcome and appreciated! Pull requests and issues will
be processed as fast as possible!
If anything goes wrong and your server doesn't work, run `sudo docker-compose down --remove-orphans` and then `sudo docker-compose up`.
Without the `-d` argument, you will see what's logged to the terminal and act accordingly. Once everything works, `Ctrl + C` (this shuts the helix server down) and then you can proceed to repeat step 6 above.
24 changes: 24 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: "3"
services:
perforce:
restart: always
container_name: "perforce-server"
environment:
DEBIAN_FRONTEND: noninteractive
P4USER: ${P4USER:-p4admin}
P4PORT: ${P4PORT:-ssl:1666}
P4PASSWD: ${P4PASSWD:-PLEASEdontForgetTOsetASTRONGpw337723817290}
SERVER_NAME: ${SERVER_NAME:-p4dsrv}
build:
context: .
dockerfile: Dockerfile
volumes:
- ${P4DOCKERVOL:-/mnt/dockervolumes/perforce}/servers:/opt/perforce/servers
- ${P4DOCKERVOL:-/mnt/dockervolumes/perforce}/triggers:/opt/perforce/triggers
ports:
- "${P4PORTNUM:-1666}:${P4PORTNUM:-1666}"
networks:
- perforce-network
networks:
perforce-network:
driver: bridge
14 changes: 0 additions & 14 deletions perforce-base/Dockerfile

This file was deleted.

5 changes: 0 additions & 5 deletions perforce-base/README.md

This file was deleted.

25 changes: 0 additions & 25 deletions perforce-search/Dockerfile

This file was deleted.

23 changes: 0 additions & 23 deletions perforce-search/README.md

This file was deleted.

79 changes: 0 additions & 79 deletions perforce-search/run.sh

This file was deleted.

16 changes: 0 additions & 16 deletions perforce-server/Dockerfile

This file was deleted.

21 changes: 0 additions & 21 deletions perforce-server/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion perforce-server/run.sh → run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

# Perforce paths
CONFIGURE_SCRIPT=/opt/perforce/sbin/configure-perforce-server.sh
CONFIGURE_SCRIPT=/opt/perforce/sbin/configure-helix-p4d.sh
SERVERS_ROOT=/opt/perforce/servers
CONFIG_ROOT=/etc/perforce/p4dctl.conf.d

Expand Down