# To build all the docker images: # docker-compose build # or a specific one: # docker-compose build ${SERVICE_NAME} # # export SERVICE_NAME=ubuntu # # To extract the cargo cache from the container: # docker-compose run --rm ${SERVICE_NAME} cp docker_cargo_cache.tar.gz artifacts/ # # To get a shell inside the container: # docker-compose run --rm ${SERVICE_NAME} # # NOTE: The 'artifacts' directory of each container is mounted so one can copy # files from inside a container. # # Install a toolchain and transfer it back: # docker-compose up -d ${SERVICE_NAME} # docker-compose exec ${SERVICE_NAME} mkdir .hygeia/cache # docker-compose exec ${SERVICE_NAME} hygeia install ~3.7 --extra # docker-compose exec ${SERVICE_NAME} sh -c 'cp -r ${HOME}/.hygeia/installed artifacts/' # # Delete **all** containers (loosing any built toolchains) # docker-compose down # # Without docker-compose: # Build the image: # export OS_NAME="ubuntu" # export OS_VERSION="16.04" # export RUST_VERSION="1.40.0" # docker build --build-arg OS_NAME=${OS_NAME} --build-arg OS_VERSION=${OS_VERSION} --build-arg DOCKER_GID=`id --group` --build-arg DOCKER_UID=`id --user` --build-arg RUST_VERSION=${RUST_VERSION} --tag hygeia_${OS_NAME} --file docker/${OS_NAME}/Dockerfile . # docker run --rm --detach --name hygeia_${OS_NAME} --volume `pwd`/docker/${OS_NAME}/artifacts:/home/hygeia/artifacts hygeia_${OS_NAME} sleep 9999999 # docker exec -it hygeia_${OS_NAME} hygeia install ~3.7 --extra # docker exec -it hygeia_${OS_NAME} sh -c 'cp -r ${HOME}/.hygeia/installed artifacts/' # docker stop hygeia_${OS_NAME} # docker kill hygeia_${OS_NAME} version: "3.7" services: ubuntu: image: hygeia_ubuntu build: context: . dockerfile: docker/ubuntu/Dockerfile args: OS_NAME: "ubuntu" OS_VERSION: "16.04" RUST_VERSION: "1.40.0" environment: RUST_LOG: hygeia=debug stdin_open: true tty: true volumes: - ./docker/ubuntu/artifacts:/home/hygeia/artifacts debian_sid: image: hygeia_debian_sid build: context: . dockerfile: docker/debian/sid/Dockerfile args: OS_NAME: "debian" OS_VERSION: "sid-20191224" RUST_VERSION: "1.40.0" environment: RUST_LOG: hygeia=debug stdin_open: true tty: true volumes: - ./docker/debian/sid/artifacts:/home/hygeia/artifacts fedora: image: hygeia_fedora build: context: . dockerfile: docker/fedora/Dockerfile args: OS_NAME: "fedora" OS_VERSION: "31" RUST_VERSION: "1.40.0" environment: RUST_LOG: hygeia=debug stdin_open: true tty: true volumes: - ./docker/fedora/artifacts:/home/hygeia/artifacts alpine: image: hygeia_alpine build: context: . dockerfile: docker/alpine/Dockerfile args: OS_NAME: "alpine" OS_VERSION: "3.10.3" RUST_VERSION: "1.40.0" # See https://github.com/rust-lang/rust/issues/59302 RUSTFLAGS: -C target-feature=-crt-static environment: RUST_LOG: hygeia=debug stdin_open: true tty: true volumes: - ./docker/alpine/artifacts:/home/hygeia/artifacts