https://github.com/yaegashi/p4p-docker
Helix Core Proxy Server (P4P) Docker Container
https://github.com/yaegashi/p4p-docker
docker helix-core helix-proxy p4p perforce
Last synced: 3 months ago
JSON representation
Helix Core Proxy Server (P4P) Docker Container
- Host: GitHub
- URL: https://github.com/yaegashi/p4p-docker
- Owner: yaegashi
- Created: 2020-04-19T13:14:51.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-16T06:18:08.000Z (over 1 year ago)
- Last Synced: 2025-04-03T23:12:23.609Z (about 1 year ago)
- Topics: docker, helix-core, helix-proxy, p4p, perforce
- Language: Dockerfile
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Helix Core Proxy Server (P4P) Docker Container
## Introduction
This is a Docker container for the Helix Core Proxy Server (P4P).
The container includes the following executable binaries from the Perforce distribution:
- [Helix Core Proxy Server (P4P)](https://www.perforce.com/downloads/helix-core-proxy-server-p4p)
- [Helix Command-Line Client (P4)](https://www.perforce.com/downloads/helix-command-line-client-p4)
The container images are published at `ghcr.io/yaegashi/p4p-docker/p4p`.
It supports linux/amd64 and linux/arm64 platforms starting from the r24.2 release.
## Running Container
It is recommended to use [Docker Compose](https://docs.docker.com/compose/)
with compose.yml like the following:
```yaml
services:
p4p:
image: ghcr.io/yaegashi/p4p-docker/p4p:r24.2
# P4P command line options
# https://www.perforce.com/manuals/p4sag/Content/P4SAG/chapter.proxy.html
command: -v proxy.monitor.level=0
# P4P Environment variables
# https://www.perforce.com/manuals/cmdref/Content/CmdRef/envars.html
environment:
TZ: Asia/Tokyo
P4DEBUG: server=1
P4PORT: ssl:1666
P4TARGET: ssl:target-server:1666
ports:
- 1666:1666
volumes:
- ./data:/data
logging:
driver: json-file
options:
max-size: "1g"
max-file: "10"
```
To create and launch a container:
```console
docker compose up -d
```
To stop the container:
```console
docker compose down
```
To view container status:
```console
docker compose ps
```
To view container logs:
```console
docker compose logs
```
Note: You can use `--tail=N` to limit the log output.
Logs will be lost when the container is removed by `docker compose down`.
To stream logs in real-time (type Ctrl+C to stop):
```console
docker compose logs --tail=100 -f
```
To compress and archive logs:
```console
docker compose logs -t --no-log-prefix | gzip -c9 > p4p.log.gz
```
To check the expiration date of the certificate generated by p4p:
```console
openssl x509 -text -noout -in ./data/ssl/certificate.txt | grep -a3 'Not After'
```
Example output:
```text
Issuer: C = US, ST = CA, L = Alameda, O = Perforce Autogen Cert, CN = 94647952efa8
Validity
Not Before: Nov 16 04:00:13 2024 GMT
Not After : Nov 16 04:00:13 2026 GMT
Subject: C = US, ST = CA, L = Alameda, O = Perforce Autogen Cert, CN = 94647952efa8
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
```
To regenerate the certificate, just remove files data/ssl/*.txt and restart the container:
```console
rm ./data/ssl/*.txt
docker compose restart
```