I wanted to use docker if I have time, but it was quite difficult to uderstand image and container.

And finally I’ve successed to build pure Arch Linux image by myself.

So, what is docker?

I am not a very professional of it, but you can find tons of documents introducing about docker on the web.

As my understanding this is half-virtualization for Linux. (Using only User-area independent from original Linux-Kernal, but using your local Linux-Kernal.)

There is no official Arch Linux docker image, so I decided to build by myself, and yes, it gave me more understanding of docker.

Minibrary Docker Hub Arch Linux Image Link

0. Install docker

You can install docker by apt, yum or any other package managers, but I would like to install via ppa provided by docker.

First of all, check curl is installed or not.

which curl

If no curl, install first.

sudo apt update && sudo apt install curl -y

Once you installed curl, install docker with below command,

curl -fsSL https://get.docker.com/ | sh

Shell will ask you sudo password once you run command. Input it.

1. Pull image

Pull image with below command. (This Arch Linux image has built by me.)

sudo docker pull minibrary/archlinux

List the docker images you have.

sudo docker images

2. Run Image

Let’s run pulled image with bash.

sudo docker run -i -t --name arch minibrary/archlinux /bin/bash

Once you run above command, /bin/bash will be run.

3. Repository update

Currently there is almost nothing in Arch Linux, because I built on pure Arch Linux without installing any packages.

First of all, let’s update Repository.

pacman -Syu

4. Exit, and Start

You can exit current status of container.

Run exit then you will be out of container, and container will be stopped.


Check the status of container with below command.

sudo docker ps

Yes, there is nothing.

This command shows only running-containers.

Let’s check all containers including stopped.

sudo docker ps -a

There is container named arch, statusis exited.

So, how to start container again?

Go with below command, using name you created.

It will run with same environment when you created container, command with sudo docker run ~~~

sudo docker start arch && sudo docker ps

At this state, you can attach container.

(This brings you /bin/bash into container.)

sudo docker attach arch

Just press any key after run command.

You will see that connected to Arch Linux bash cli.

If you don’t need container any more, you can simply delete so keeping local Linux clean!

Yeah, we learned very simple usage of docker and Arch Linux on Ubuntu Environmen!