IntelliJ
All of the code is tested to work with the IntelliJ Community Edition.
You can download and install it for free from here: https://www.jetbrains.com/idea/download/#section=windows
Git
Your machine should be configured with Git access. You can install Git from here: https://git-scm.com/downloads
On Windows configure Git to commit with Linux line endings |
Docker Toolbox
Docker Toolbox works only on Windows and MacOS. On Linux operating systems you have Docker without additional layer of Docker Machine.
Installation
Install Docker Toolbox following the instructions from the Docker site.
Virtual Box will be installed as part of the process. |
Preparing Developer’s Docker Machine
You may get more information from Docker Getting Started Guide, but we need only basic docker machine.
Create your 'dev' machine with the following command:
docker-machine create --driver virtualbox dev
For large exercises you may need more CPUs and memory, so you can create you 'dev' machine with the following command:
docker-machine create --driver virtualbox --virtualbox-cpu-count 2 --virtualbox-memory "2048" dev
Run the following command
$ docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM dev * virtualbox Running tcp://192.168.99.100:2376
Make sure that the status of the 'dev' machine is 'Running'.
Configuring Docker command
Now we need to configure the environment for the 'docker' command.
C:\> docker-machine env --shell=cmd dev SET DOCKER_TLS_VERIFY=1 SET DOCKER_HOST=tcp://192.168.99.100:2376 SET DOCKER_CERT_PATH=C:\Users\user\.docker\machine\machines\dev SET DOCKER_MACHINE_NAME=dev REM Run this command to configure your shell: REM FOR /f "tokens=*" %i IN ('docker-machine env --shell=cmd dev') DO %i C:\> FOR /f "tokens=*" %i IN ('docker-machine env --shell=cmd dev') DO %i
$ docker-machine env --shell=bash dev export DOCKER_TLS_VERIFY="1" export DOCKER_HOST="tcp://192.168.99.101:2376" export DOCKER_CERT_PATH="/Users/user/.docker/machine/machines/dev" export DOCKER_MACHINE_NAME="dev" # Run this command to configure your shell: # eval "$(docker-machine env default)" $ eval "$(docker-machine env dev)"
Setting Dockerhost
Edit hosts
file to simplify access to the docker machine.
OS | Location of hosts file |
---|---|
Linux |
/etc/hosts |
MacOS |
/etc/hosts |
Windows (edit |
C:\Windows\System32\drivers\etc |
You add the following line:
192.168.99.100 dockerhost
From this point on we’ll be referring to the IP of the Docker Machine as dockerhost. |
Curl
This section is only for Windows users. Linux have Curl available out of the box. |
Curl for Windows
Navigate to Curl Downloads and pick the, right for you, x32/x64 package and follow the instructions.
Ruby
Ruby for Windows
Navigate to Ruby downloads page and get the, right for you, x32/x64 package of the latest Ruby.
At the moment this article was written, latest Ruby package version was 2.2.4 |
After Ruby is installed you need, from the same page, to download and
install Ruby Development Kit
. Follow the installtion instructions for Ruby
Development Kit
Gradle
Gradle installation instructions.
Gradle for Windows
Install Gradle from Gradle downloads page.
For running Gradle, add GRADLE_HOME/bin to your PATH environment variable. Usually, this is sufficient to run Gradle.