Docker
Docker is a runtime for running containers. On Linux Docker utilizes the kernel to isolate and sandbox processes in virtual filesystems and networks. On Windows it does the same thing but runs a Linux virtual machine.
Warning
Docker Desktop must not be installed.
Install
Windows
Download and install Rancher Desktop.
You might have to enable some virtualization in BIOS and/or enable 'Hyper-V', 'Virtual Machine Platform' and 'Windows Subsystem for Linux' in Windows Features. A message about this should be shown automatically if necessary.
Linux (and WSL)
Follow the guide for your distro on docs.docker.com/engine/install.
Some projects require your user to be able to run docker commands directly. You
may need to update your permissions: Ensure your user is part of the docker
user group.
Login (Windows & Linux)
First add a hosts file entry that maps the hostname docker to your localhost machine. The hosts
file can be found in:
- Windows:
C:\Windows\System32\drivers\etc\hosts - Linux:
/etc/hosts
Add the following line at the end of the file:
127.0.0.1 docker
Now log in to the GitLab Docker registry:
- Create a GitLab Access Token with
read_registryrights for use in Docker on your machine. - Create a GitLab Access Token with
apirights for use in scripts on your machine. - Open your TTY shell of choice
- To be able to pull our own images run the command:
docker login registry.gitlab.com - To be able to pull images from the gitlab dependency proxy run the command:
docker login gitlab.com
For both commands, use the following credentials:
- username: Your GitLab username, which can be found on your Gitlab Account
- password: If logging in to registry.gitlab.com, use the access token created in step 1. If logging in to gitlab.com, use the access token created in step 2.