preliminary support for cross-platform docker containers
This commit is contained in:
parent
07bb5516c1
commit
ccfea09e3f
17
docker-build
Executable file
17
docker-build
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# generate random UUID for new SUV
|
||||||
|
# thanks https://stackoverflow.com/questions/34328759
|
||||||
|
SUV_ID=$(hexdump -vn8 -e'2/4 "%08x" 1 "\n"' /dev/urandom)
|
||||||
|
SUV_NAME=i-0$SUV_ID
|
||||||
|
|
||||||
|
# build the image (i.e. 'mocha suv init' )
|
||||||
|
docker build -t mocha-httpd -f mocha-suv/docker/Dockerfile .
|
||||||
|
|
||||||
|
# initiate a container (i.e. 'mocha suv up i-0...' )
|
||||||
|
docker run --name $SUV_NAME -d --net mocha-docker -it mocha-httpd # -p 8000:80 mocha-httpd
|
||||||
|
|
||||||
|
echo "waiting for network to settle..."
|
||||||
|
sleep 3
|
||||||
|
|
||||||
|
docker inspect $SUV_NAME
|
||||||
7
mocha-suv/docker/Dockerfile
Normal file
7
mocha-suv/docker/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM httpd
|
||||||
|
|
||||||
|
RUN apt update && apt upgrade && apt install -y php php-mbstring php-curl php-xml pwgen
|
||||||
|
RUN rm /usr/local/apache2/htdocs/index.html
|
||||||
|
|
||||||
|
COPY mocha-php/mocha-php/src/mocha-php /usr/local/apache2/htdocs/
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user