Skip to content

Commit

Permalink
Closes loklak#968, Merged docker build sections
Browse files Browse the repository at this point in the history
  • Loading branch information
idealadarsh committed Jan 11, 2017
1 parent e534f4b commit 6238b9b
Showing 1 changed file with 31 additions and 35 deletions.
66 changes: 31 additions & 35 deletions docs/installation_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,45 @@

Docker is a way to move applications including the operating system to servers.

## Get a loklak Docker image
## Get a Docker image

Each of the following sections depend on a docker image with a loklak server inside.
This section shows you how to get such an image.
Some possibilities may be used in the sections but you can mey be able to exchenge them.
Some possibilities may be used in the sections but you can may be able to exchange them.

- pull a docker image from [dockerhub](https://hub.docker.com/r/mariobehling/loklak/):
#### Pull a loklak docker image
Pull a docker image from [dockerhub](https://hub.docker.com/r/mariobehling/loklak/).

Type this command in your terminal:
```
docker pull mariobehling/loklak
```

- clone the repository and build the image from source
#### Build a docker image on your local machine

git clone https://github.com/loklak/loklak_server.git
cd loklak_server
docker build -t mariobehling/loklak -f docker/Dockerfile .
1. Type the following commands in terminal
```
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install docker.io
sudo docker build https://github.com/loklak/loklak_server.git
```

2. You will get a hash from last command. Copy that hash and do...
```
sudo docker tag <IMAGE_HASH> <NAME_FOR_IMAGE>
```

#### Automated build on Cloud using GitHub repository

1. Signup for [Docker](https://cloud.docker.com/)
2. Go to Settings > Linked Accounts & Services.
3. Add your GitHub account and select an access level “Public and Private”, or “Limited Access”.
4. Go to your GitHub account. Settings > Applications.
5. Allow access for Docker Hub Registry.
6. Allow service hook for the repository in its settings > Webhooks & Services.
7. Select a source repository to build image in Docker Hub.
8. Enable rebuilding the Docker image when a commit is pushed to the GitHub repository.
9. Congratulations, you have completed the setup of automated image build.


## Installing loklak on Bluemix with Docker
Expand Down Expand Up @@ -238,31 +262,3 @@ Enter your assigned HTTP IP address into your browser to check if it is working.
```

7. Go to your droplet IP using web browser. You should see Loklak main page.

## Build your own docker container

### Local machine

1. Type the following commands in terminal
```
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install docker.io
sudo docker build https://github.com/loklak/loklak_server.git
```

2. You will get a hash from last command. Copy that hash and do...
```
sudo docker tag <IMAGE_HASH> <NAME_FOR_IMAGE>
```

### Automated build on Cloud using GitHub repository

1. Signup for [Docker](https://cloud.docker.com/)
2. Go to Settings > Linked Accounts & Services.
3. Add your GitHub account and select an access level “Public and Private”, or “Limited Access”.
4. Go to your GitHub account. Settings > Applications.
5. Allow access for Docker Hub Registry.
6. Allow service hook for the repository in its settings > Webhooks & Services.
7. Select a source repository to build image in Docker Hub.
8. Enable rebuilding the Docker image when a commit is pushed to the GitHub repository.
9. Congratulations, you have completed the setup of automated image build.

0 comments on commit 6238b9b

Please sign in to comment.