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 pull docker.pkg.github.com/engineer-man/piston/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..
|
||||
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
|
||||
# Start a piston container
|
||||
docker run \
|
||||
--privileged \
|
||||
-v "$PWD/build":'/piston/packages' \
|
||||
--tmpfs /piston/jobs \
|
||||
-dit \
|
||||
-p $port:2000 \
|
||||
--name builder_piston_instance \
|
||||
ghcr.io/engineer-man/piston
|
||||
|
||||
|
||||
# Ensure the CLI is installed
|
||||
cd ../cli
|
||||
npm i
|
||||
cd -
|
||||
|
||||
# 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(){
|
||||
|
@ -61,4 +62,4 @@ fetch_packages $SPEC_FILE
|
|||
build_container $TAG
|
||||
|
||||
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
|
||||
volumes:
|
||||
- ./data/piston/packages:/piston/packages
|
||||
environment:
|
||||
- PISTON_REPO_URL=http://repo:8000/index
|
||||
tmpfs:
|
||||
- /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
|
||||
build: repo
|
||||
|
|
Loading…
Reference in New Issue