FROM ubuntu-base MAINTAINER Robert Cowham "rcowham@perforce.com" # This script sets up: # - SDP filesystems # - perforce account # - some useful scripts for testing and a wrapper for Docker to run 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; \ # \ # Helpful profile \ # \ BASH_PROF=/p4/.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; \ # \ # Reset script if required \ # \ RESET_SDP=/p4/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; \ # \ # Script to run all tests \ # \ RUN_SDP_TESTS=/p4/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 /p4/test_SDP.py'>> $RUN_SDP_TESTS; \ chmod +x $RUN_SDP_TESTS; \ chown perforce:perforce $RUN_SDP_TESTS; \ # \ # The file run by docker - just runs the whole thing as perforce user \ # \ DOCKER_ENTRY=/p4/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; CMD ["/p4/docker_entry.sh"]
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#8 | 27002 | C. Thomas Tyler |
Updated ubuntu tests to add needed utilities, and change from testing Ubuntu 16.04 to 20.04. Changed 'centos' to imply cento7 rather than centos6 (which we shoud drop soon). |
||
#7 | 25263 | Robert Cowham |
Fix Centos permissions Fix ubuntu ssh |
||
#6 | 25259 | Robert Cowham | Fix Ubuntu user account in dockerfile | ||
#5 | 25258 | Robert Cowham |
Rework the containers in preparation for multi container testing mkrep changes: Remove -c cfg option which was unused anyway Converted tabs to spaces Fixed logic error causing forwarding replicas to bail due to unsupported p4d version Standby servers require ReplicatingFrom field Add seconds to log file name (useful for testing to avoid overwriting files) |
||
#4 | 19045 | Robert Cowham |
Add docker file for Centos7 Refactor to move common stuff to a shell script. |
||
#3 | 19040 | Robert Cowham |
Tweaks to Docker files. Ubuntu uses packages for Python 3.4. Centos doesn't yet. |
||
#2 | 19019 | Robert Cowham | Run ubuntu | ||
#1 | 19017 | Robert Cowham | Ubuntu basic docker working |