-
Notifications
You must be signed in to change notification settings - Fork 0
Docker
We do provide a image on the docker hub. You can download it using the following command. You can skip the step of creating your container.
docker pull maxkofler/acacialinuxIf you want to create the image yourself, follow the steps of "Creating a Docker container image"
This guide helps you to create a docker image of your AcaciaLinux, this is mainly for development reasons.
First of all, you will need a rootfs tarball, eg. acacialinux.tar.xz . You need to create a directory for building your docker image:
mkdir acaciaImageTo which you will copy the rootfs tarball and extract it:
cp ....../acacialinux.tar.xz acaciaImage/
cd acaciaImage
tar xpfv acacialinux.tar.xzDocker needs a file that describes the image, but ours will be very simple. Create acaciaImage/Dockerfile and paste the following contents:
FROM scratch
ADD . /Note that the Dockerfile has to be IN the rootfs. This says that we create a image from scratch using the contents of the current directory (the directory of the Dockerfile) as root.
Once the upper steps are done, you can build the docker image using the following command:
docker build -t acacialinux/acacialinux acaciaImageOnce we created the image, we can instantiate containers from it using the following command:
docker create --name myAcaciaLinux -t -i maxkofler/acacialinux:latest bashThis will create a container named myAcaciaLinux using our generated image and on startup, it will execute the command bash.
If you created the container yourself, use acacialinux/acacialinux instead of maxkofler/acacialinux.
Before using the container, you will have to start it using the following command:
docker start myAcaciaLinuxIf you want to receive a shell from the container just use the following command on your host:
docker exec -it myAcaciaLinux bashAnd to apply your bash config once in the container:
source /etc/profileIf you want to pass the container a local directory you can skip the steps of pulling, creating and starting the container and use this step immediately:
docker run --name=<myName> -it -d -v /absolute/path/to/source/:/path/in/container maxkofler/acacialinux bashYou now have a AcaciaLinux container at your disposal, and you can create many more from your image!