FROM centos-base MAINTAINER Robert Cowham "rcowham@perforce.com" # This script sets up: # - SDP filesystems # - perforce account RUN mkdir /depotdata; \ mkdir /metadata; \ mkdir /logs; \ groupadd perforce; \ useradd -d /p4 -s /bin/bash -m perforce -g perforce; \ echo 'perforce ALL=(ALL) NOPASSWD:ALL'> /tmp/perforce; \ chmod 0440 /tmp/perforce; \ chown root:root /tmp/perforce; \ mv /tmp/perforce /etc/sudoers.d; \ echo perforce:Password | chpasswd; \ # \ BASH_PROF=/tmp/.bash_profile; \ echo 'export PATH=/sdp/Server/Unix/p4/common/bin:$PATH'> $BASH_PROF; \ echo 'export P4CONFIG=.p4config'>> $BASH_PROF; \ echo 'export P4P4PORT=1666'>> $BASH_PROF; \ chown perforce:perforce $BASH_PROF; \ mv $BASH_PROF /p4; \ # \ RESET_SDP=/tmp/reset_sdp.sh; \ echo '#!/bin/bash'> $RESET_SDP; \ echo 'sudo cp -R /sdp /depotdata'>> $RESET_SDP; \ echo 'sudo chown -R perforce:perforce /depotdata/sdp'>> $RESET_SDP; \ chmod +x $RESET_SDP; \ chown perforce:perforce $RESET_SDP; \ mv $RESET_SDP /p4; \ # \ RUN_SDP_TESTS=/tmp/test_sdp.sh; \ echo '#!/bin/bash'> $RUN_SDP_TESTS; \ echo '/p4/reset_sdp.sh'>> $RUN_SDP_TESTS; \ echo 'ln -s /sdp/Server/test/test_SDP.py /p4/test_SDP.py'>> $RUN_SDP_TESTS; \ echo 'python3.3 /p4/test_SDP.py'>> $RUN_SDP_TESTS; \ chmod +x $RUN_SDP_TESTS; \ chown perforce:perforce $RUN_SDP_TESTS; \ mv $RUN_SDP_TESTS /p4; \ # \ # The file run by docker - just runs the whole thing as perforce user \ # \ DOCKER_ENTRY=/tmp/docker_entry.sh; \ echo '#!/bin/bash'> $DOCKER_ENTRY; \ echo 'su -l perforce -c /p4/test_sdp.sh > /sdp/test-ubuntu.out 2>&1'>> $DOCKER_ENTRY;\ chmod +x $DOCKER_ENTRY; \ chown perforce:perforce $DOCKER_ENTRY; \ mv $DOCKER_ENTRY /p4
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 19045 | Robert Cowham |
Add docker file for Centos7 Refactor to move common stuff to a shell script. |
||
#2 | 19040 | Robert Cowham |
Tweaks to Docker files. Ubuntu uses packages for Python 3.4. Centos doesn't yet. |
||
#1 | 19021 | Robert Cowham | Centos tests working too |