When building a Java execution environment on a new personal computer, a memorandum I thought I would try with Docker
- Windows 10 Home (64bit)
- Download Docker Toolbox [link] including VirtualBox and Kitematic
- The default settings on the Setup screen are OK. Confirm on the last screen and click [Install].
- When you launch the Docker Quickstart Terminal shortcut created on your desktop (such as >🐋), it will be displayed in various ways. Wait.
- Complete when a whale picture appears like an image
docker run hello-worldin the Docker terminal and press Enter. A Docker image named “hello-world” will be downloaded.
Download Docker image
You can also enter commands in the terminal as it is, but this time try downloading the Docker image using Kitematic that is visually easy to understand
- Start Kitematic from the desktop shortcut
- Select [USE VIRTUALBOX] on the “Setup Initialization” screen and do not need to create a DockerHub account.
- Enter the keyword in the search box on the screen displayed after setup is complete (this time, java)
- Select “openjdk” this time from the candidates that appeared and press the [CREATE] button
- When “openjdk” is displayed in the Containers column on the left side and the gray icon is displayed like “hello-world” (downloaded from the terminal earlier), the download is completed.
** When "Connecting to Docker Hub" is displayed and download does not proceed **
Create a container from a Docker image
When I wanted to do this with Kitematic as well, it stopped immediately after I clicked [START] many times, so I returned to the Docker terminal and started working.
docker run -it --name testcont openjdk:latestto create a container in a running state (“testcont” is the name of the container)