The Dockerfiles in this directory are used for testing certain Linux commands. Some things don't work perfect, such as restarting systemd services (there is no systemd in the container) or connecting dnsdock to the Docker Bridge IP, but other code that checks for platform, etc. should run fine.
The way you use them is as follows.
- For each Dockerfile, build the image
docker build -t test-fedora -f Dockerfile.fedora .docker build -t test-ubuntu -f Dockerfile.ubuntu .docker build -t test-centos -f Dockerfile.centos .
GOARCH=amd64 GOOS=linux go build -o build/linux/rig cmd/main.go
- Start Docker in Docker
docker run --privileged -it --name dind -d docker:dind
- Start the container for the distro you want, mounting a linux targeted
riginto it and linking it to the Docker in Docker image.docker run -it -v $PWD/build/linux/rig:/usr/bin/rig --link dind:docker test-centos bash
- You are now at a shell in the Linux container with
rigin/usr/bin/rig