Add privileged flags where needed
This commit is contained in:
parent
b3cc3c14e8
commit
6b02d120fd
|
@ -92,7 +92,7 @@ jobs:
|
||||||
docker run -v $(pwd)'/repo:/piston/repo' -v $(pwd)'/packages:/piston/packages' -d --name repo docker.pkg.github.com/engineer-man/piston/repo-builder --no-build
|
docker run -v $(pwd)'/repo:/piston/repo' -v $(pwd)'/packages:/piston/packages' -d --name repo docker.pkg.github.com/engineer-man/piston/repo-builder --no-build
|
||||||
docker pull docker.pkg.github.com/engineer-man/piston/api
|
docker pull docker.pkg.github.com/engineer-man/piston/api
|
||||||
docker build -t piston-api api
|
docker build -t piston-api api
|
||||||
docker run --network container:repo -v $(pwd)'/data:/piston' -e PISTON_LOG_LEVEL=DEBUG -e 'PISTON_REPO_URL=http://localhost:8000/index' -d --name api piston-api
|
docker run --privileged --network container:repo -v $(pwd)'/data:/piston' -e PISTON_LOG_LEVEL=DEBUG -e 'PISTON_REPO_URL=http://localhost:8000/index' -d --name api piston-api
|
||||||
echo Waiting for API to start..
|
echo Waiting for API to start..
|
||||||
docker run --network container:api appropriate/curl -s --retry 10 --retry-connrefused http://localhost:2000/api/v2/runtimes
|
docker run --network container:api appropriate/curl -s --retry 10 --retry-connrefused http://localhost:2000/api/v2/runtimes
|
||||||
|
|
||||||
|
|
|
@ -23,20 +23,21 @@ fetch_packages(){
|
||||||
mkdir build
|
mkdir build
|
||||||
# Start a piston container
|
# Start a piston container
|
||||||
docker run \
|
docker run \
|
||||||
|
--privileged \
|
||||||
-v "$PWD/build":'/piston/packages' \
|
-v "$PWD/build":'/piston/packages' \
|
||||||
--tmpfs /piston/jobs \
|
--tmpfs /piston/jobs \
|
||||||
-dit \
|
-dit \
|
||||||
-p $port:2000 \
|
-p $port:2000 \
|
||||||
--name builder_piston_instance \
|
--name builder_piston_instance \
|
||||||
ghcr.io/engineer-man/piston
|
ghcr.io/engineer-man/piston
|
||||||
|
|
||||||
# Ensure the CLI is installed
|
# Ensure the CLI is installed
|
||||||
cd ../cli
|
cd ../cli
|
||||||
npm i
|
npm i
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
# Evalulate the specfile
|
# Evalulate the specfile
|
||||||
../cli/index.js -u "http://127.0.0.1:$port" ppman spec $1
|
../cli/index.js -u "http://127.0.0.1:$port" ppman spec $1
|
||||||
}
|
}
|
||||||
|
|
||||||
build_container(){
|
build_container(){
|
||||||
|
@ -61,4 +62,4 @@ fetch_packages $SPEC_FILE
|
||||||
build_container $TAG
|
build_container $TAG
|
||||||
|
|
||||||
echo "Start your custom piston container with"
|
echo "Start your custom piston container with"
|
||||||
echo "$ docker run --tmpfs /piston/jobs -dit -p 2000:2000 $TAG"
|
echo "$ docker run --privileged --tmpfs /piston/jobs -dit -p 2000:2000 $TAG"
|
||||||
|
|
|
@ -10,10 +10,12 @@ services:
|
||||||
- 2000:2000
|
- 2000:2000
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/piston/packages:/piston/packages
|
- ./data/piston/packages:/piston/packages
|
||||||
environment:
|
|
||||||
- PISTON_REPO_URL=http://repo:8000/index
|
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /piston/jobs:exec,uid=1000,gid=1000,mode=711
|
- /piston/jobs:exec,uid=1000,gid=1000,mode=711
|
||||||
|
environment:
|
||||||
|
- PISTON_DISABLE_NETWORKING=false
|
||||||
|
- PISTON_RUN_CPU_TIME=1000
|
||||||
|
- PISTON_LIMIT_OVERRIDES={"c++":{"run_cpu_time":700}}
|
||||||
|
|
||||||
repo: # Local testing of packages
|
repo: # Local testing of packages
|
||||||
build: repo
|
build: repo
|
||||||
|
|
Loading…
Reference in New Issue