Source code of Dockerfile and utilities live on github.com/mj41/docker-perl6-star.
The official Docker image
You should know what Docker, Docker image and Docker containers are about. Please read:
Install and start Docker service. Example for Fedora 23:
sudo dnf -y install docker sudo systemctl start docker sudo systemctl status docker docker info
For other distributions or Mac OS see installation guide.
Pull mj41/perl6-star image. Command below is going to download nearly 1GB of data from Internet.
It contains base fedora:23 image and many other layers of mj41/perl6-star Docker image.
docker pull mj41/perl6-star:latest
HowTo Hello word
Try "Hello world from Docker container".
docker run -i -t --rm --name my-first-p6-temp mj41/perl6-star:latest /bin/bash -c $'perl6 -e\'say "Hello world from Docker container!"\''
HowTo play with Rakudo Perl 6
Create interactive container and run Bash shell inside:
docker run -i -t --name p6-test-container mj41/perl6-star:latest /bin/bash
Now you can run e.g.
perl6 -e'say "hello"'
Command 'exit' is going to exit shell and container is stopped
See all (including stopped) containers
docker ps -a
Start 'p6-test-container' container (Bash) again
docker start -i p6-test-container exit
You can delete container and all data/files you made inside:
docker rm p6-test-container
HowTo mount your host directory
You can mount your host directory to Docker container (read-write):
export P6_DEV_DIR="$HOME/perl6-my-dev/" echo $P6_DEV_DIR mkdir -p $P6_DEV_DIR chmod a+rwx $P6_DEV_DIR chcon -Rt svirt_sandbox_file_t $P6_DEV_DIR echo 'say "Hello from host file running inside Docker container."' > $P6_DEV_DIR/base-test.p6 docker run -i -t --rm -v $P6_DEV_DIR:/mnt/host-p6-dir:ro --name p6-dev-container mj41/perl6-star:latest /bin/bash
and inside container bash:
- 2016.11 (Fedora 25)
- latest should be the same as the one a line above