Build from a local folder if it's been mounted by docker
For CI, run docker run --rm -it --cap-add SYS_ADMIN --privileged harvey:Dockerfile
To build from the repo: docker build -t harvey:Dockerfile . && docker run --rm -it --cap-add SYS_ADMIN --privileged harvey:Dockerfile
To build from a local directory: docker build -t harvey:Dockerfile . && docker run --rm -it --mount type=bind,source=$HARVEY,target=/usr/local/harvey_local,readonly --cap-add SYS_ADMIN --privileged harvey:Dockerfile
It's not very sophisticated - it mounts the local repo, then copies it to another directory before building. There's probably some cleverer way to do it, but it works.
It does simplify some things - the linux toolchain is placed in /usr/local/harvey_local - referred to throughout as HARVEY_LOCAL. This gets rid of the arch-specific directory.
To test the PR, you'd need to change HARVEY_OWNER to gmacd and HARVEY_BRANCH to docker-local in the BUILD_IN_DOCKER script.
Build from a local folder if it's been mounted by docker
For CI, run
docker run --rm -it --cap-add SYS_ADMIN --privileged harvey:Dockerfile
To build from the repo:
docker build -t harvey:Dockerfile . && docker run --rm -it --cap-add SYS_ADMIN --privileged harvey:Dockerfile
To build from a local directory:
docker build -t harvey:Dockerfile . && docker run --rm -it --mount type=bind,source=$HARVEY,target=/usr/local/harvey_local,readonly --cap-add SYS_ADMIN --privileged harvey:Dockerfile
It's not very sophisticated - it mounts the local repo, then copies it to another directory before building. There's probably some cleverer way to do it, but it works.
It does simplify some things - the linux toolchain is placed in /usr/local/harvey_local - referred to throughout as
HARVEY_LOCAL
. This gets rid of the arch-specific directory.To test the PR, you'd need to change HARVEY_OWNER to gmacd and HARVEY_BRANCH to docker-local in the BUILD_IN_DOCKER script.