Instructions to create simple, ready for testing container with archlinux in it to do some experiments on fresh install
Base image: https://hub.docker.com/_/archlinux/
Get/update image:
docker pull archlinux:multilib-develRun container once:
docker run -itv "/host/directory/to/mount:/container/directory/to/mount" --rm archlinux:multilib-develCreate named container:
Here, replace the %name% with your desired name
docker create -itv "/host/directory/to/mount:/container/directory/to/mount" --name %name% archlinux:multilib-develStart the container:
You can use container id if you have not specified name for it
docker start -ai %name%This can be either done manually using container, created by official archlinux image, or you can create your own image, based on it
In this example, replace %user% with your desired username and %password% with your password:
FROM archlinux:multilib-devel AS runner
# uncomment wheel group to make new user root
RUN sed -i 's/^# %wheel/%wheel/' /etc/sudoers
# update packages
RUN sudo pacman -Syuu --noconfirm
# install dev packages
RUN sudo pacman -S --noconfirm --needed git base-devel
# add new user
RUN useradd -rms /bin/bash -g root -G wheel -p "$(openssl passwd -6 %password%)" %user%
USER %user%
WORKDIR /home/%user%
ENTRYPOINT ["/bin/bash"]Building the image:
Replace the %image_name% with your desired name:
docker build . -t %image_name%:latestIn case you have your git info in ~/.config/git, it will be overriden the moment you open vscode with ~/.gitconfig. Remove this file before commiting
You can create your custom gitlab container with these two simple lines:
docker volume create gitlab-data
docker run --detach --hostname localhost --publish 8443:443 --publish 8080:80 --publish 2222:22 --name gitlab --restart always --volume gitlab-data:/var/opt/gitlab gitlab/gitlab-ce:latestIt will run on your local address with port 8080 (e.g. http://192.168.11.144:8080/). Log in with default root password and create users. You can commit to this server using ssh by creating a new ssh public key and editing ~/.ssh/config, e.g.:
Host gitlab
HostName 192.168.11.144
User gigas
Port 2222
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yesThe container is also updatable, so you can always do docker pull gitlab-ce:latest before running a new entry