Public | Automated Build

Last pushed: 2 months ago
Short Description
Short description is empty for this repo.
Full Description

Docker Perforce Images

A collection of Perforce docker images:

  • Perforce Base, an image containing the official repo and the p4 client
  • Perforce P4D Server
  • Perforce Git Fusion
  • Perforce Swarm

Installation

All operations on the images and repositories are encapsulated in Makefiles.

Build images (the Makefile's default target):

$ make [image]

Tag your images with your repo username and push the images to the Docker registry:

$ docker login
$ DOCKER_REPO=ambakshi make image push

Usage

The perforce server images are contained in their respective directories.
Each server comes with an example 'run' target that you can use to get
a server up and running quickly.

$ make -C perforce-server run
$ make -C

docker-compose

Using docker-compose it is much simpler to setup a working environment. Modify the
docker-compose.yml and the supplied envfile to customize your site. Once done,
run:

$ make
$ docker volume create --name=perforce
$ docker volume create --name=gfp4depot
$ docker-compose up -d perforce    # for p4d server
$ docker-compose up -d gfperforce  # for p4d + git-fusion server

The perforce-git-fusion image is setup to run its own p4d server. If you prefer to
run a seperate git+ssh server and connect to a running p4d instance, please open a
PR.

You won't be able to run both perforce and gfperforce at the same time, because both
containers bind to host port 1666. If you need to run both please modify the docker-compose.yml.

If you want to use a directory on your host to mount into your perforce container,
you'll need to modify the docker-compose.yml file accordingly:

services:
  perforce:
    volumes:
      /path/on/host:/data
  gfperforce:
    volumes:
      /path/on/host:/data

Testing

Download a local p4 client for your OS from Perforce's repo,
and run:

$ export P4CONFIG=.p4config

$ p4 info
User name: p4admin
Client name: titan7
Client host: titan7.local
Client unknown.
Current directory: /home/abakshi/projects/docker-perforce
Peer address: 172.18.0.1:38526
Client address: 172.18.0.1
Server address: perforce:1666
Server root: /data/p4depot
Server date: 2017/03/07 20:33:37 +0000 UTC
Server uptime: 00:04:26
Server version: P4D/LINUX26X86_64/2016.2/1487173 (2017/02/14)
ServerID: p4depot
Server services: standard
Server license: none
Case Handling: sensitive

Create a new client:

$ p4 client myclient
Perforce password (P4PASSWD) invalid or unset.
Attempting login for user 'p4admin' against server '1666'
Enter password:
User p4admin logged in.
Client myclient saved.

$ p4 -c myclient add README.md
//depot/README.md#1 - opened for add

$ p4 -c myclient submit

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

2014/12/24 - initial version
2016/05/14 - fixed perforce-git-fusion
2016/05/15 - added docker-compose support
2017/02/07 - switched default base image to centos7, and upgraded p4 to 2016.2

Credits

  • Amit Bakshi (ambakshi@gmail.com)

License

Docker Pull Command
Owner
ambakshi
Source Repository

Comments (0)