| ... | @@ -17,12 +17,12 @@ sudo docker exec -it gitlab /bin/bash |
... | @@ -17,12 +17,12 @@ sudo docker exec -it gitlab /bin/bash |
|
|
* Pre-installed Ubuntu 16.04 Desktop in Virtual Box
|
|
* Pre-installed Ubuntu 16.04 Desktop in Virtual Box
|
|
|
|
|
|
|
|
### Set up the repository
|
|
### Set up the repository
|
|
|
1. Update the apt package index:
|
|
* Update the apt package index:
|
|
|
|
|
|
|
|
```
|
|
```
|
|
|
sudo apt-get update
|
|
sudo apt-get update
|
|
|
```
|
|
```
|
|
|
2. Install packages to allow apt to use a repository over HTTPS:
|
|
* Install packages to allow apt to use a repository over HTTPS:
|
|
|
|
|
|
|
|
```
|
|
```
|
|
|
sudo apt-get install \
|
|
sudo apt-get install \
|
| ... | @@ -37,7 +37,7 @@ Add Docker's official GPG key: |
... | @@ -37,7 +37,7 @@ Add Docker's official GPG key: |
|
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
4. Set up stable repository:
|
|
* Set up stable repository:
|
|
|
|
|
|
|
|
```
|
|
```
|
|
|
sudo add-apt-repository \
|
|
sudo add-apt-repository \
|
| ... | @@ -47,51 +47,51 @@ sudo add-apt-repository \ |
... | @@ -47,51 +47,51 @@ sudo add-apt-repository \ |
|
|
```
|
|
```
|
|
|
|
|
|
|
|
### Install Docker CE
|
|
### Install Docker CE
|
|
|
1. Update the apt package index:
|
|
* Update the apt package index:
|
|
|
|
|
|
|
|
```
|
|
```
|
|
|
sudo apt-get update
|
|
sudo apt-get update
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
2. Install Docker ce latest version:
|
|
* Install Docker ce latest version:
|
|
|
|
|
|
|
|
```
|
|
```
|
|
|
sudo apt-get install docker-ce
|
|
sudo apt-get install docker-ce
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
3. Verify that Docker CE is working by running hello-world image:
|
|
* Verify that Docker CE is working by running hello-world image:
|
|
|
|
|
|
|
|
```
|
|
```
|
|
|
sudo docker run hello-world
|
|
sudo docker run hello-world
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
### Install Docker Compose on Linux
|
|
### Install Docker Compose on Linux
|
|
|
1. Download Docker Compose:
|
|
* Download Docker Compose:
|
|
|
|
|
|
|
|
```
|
|
```
|
|
|
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
|
|
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
2. Apply excecutable permissions to the binary:
|
|
* Apply excecutable permissions to the binary:
|
|
|
|
|
|
|
|
```
|
|
```
|
|
|
sudo chmod +x /usr/local/bin/docker-compose
|
|
sudo chmod +x /usr/local/bin/docker-compose
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
3. Test the installation:
|
|
* Test the installation:
|
|
|
|
|
|
|
|
```
|
|
```
|
|
|
sudo docker-compose --version
|
|
sudo docker-compose --version
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
### Install GitLab using docker-compose
|
|
### Install GitLab using docker-compose
|
|
|
1. Create docker-compose.yml file:
|
|
* Create docker-compose.yml file:
|
|
|
|
|
|
|
|
```
|
|
```
|
|
|
sudo nano docker-compose.yml
|
|
sudo nano docker-compose.yml
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
2. Insert to file (remember to edit extrenal_url!):100:
|
|
* Insert to file (remember to edit extrenal_url!):100:
|
|
|
|
|
|
|
|
```
|
|
```
|
|
|
web:
|
|
web:
|
| ... | @@ -112,7 +112,7 @@ web: |
... | @@ -112,7 +112,7 @@ web: |
|
|
- '/srv/gitlab/data:/var/opt/gitlab'
|
|
- '/srv/gitlab/data:/var/opt/gitlab'
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
3. To start GitLab run the following command in same folder where docker-compose.yml is:
|
|
* To start GitLab run the following command in same folder where docker-compose.yml is:
|
|
|
|
|
|
|
|
```
|
|
```
|
|
|
sudo docker-compose up -d
|
|
sudo docker-compose up -d
|
| ... | |
... | |
| ... | | ... | |