8

I try to install Docker on an offline (completely offline for security reasons) W7 PC. But the install process is heavily dependent on the net....are there any standalone versions to be found or are there any other workarounds.....wwould really like to get this to work.

Lars Aurdal
  • 103
  • 1
  • 5

2 Answers2

9

Haven't seen any standalone setup for Docker in windows but Docker Toolbox is what can help you achieve this.

Docker Toolbox provides a way to use Docker on Windows systems, even older that do not meet minimal system requirements for the Docker for Windows app.

Docker Toolbox includes the following Docker tools:

  • Docker CLI client for running Docker Engine to create images and containers

  • Docker Machine so you can run Docker Engine commands from Windows terminals

  • Docker Compose for running the docker-compose command Kitematic, the Docker GUI

  • the Docker QuickStart shell preconfigured for a Docker command-line environment

  • Oracle VM VirtualBox

Update:- In case you don't have boot2docker with the installation and system tries to download it on creating docker machine, you can manually download it from https://api.github.com/repos/boot2docker/boot2docker/releases/latest, have it on your offline system and manually place it at C:\Users\user_name\.docker\machine\cache and it should work. Note: Check for the appropriate version of boot2docker for your Docker Toolbox

qwerty
  • 2,392
  • 3
  • 30
  • 55
  • I tried this. The installation completed successfully, but as soon as I tried to start the docker shell or kitematic it reached out to download a Boot2Docker ISO from the internet. – naugler May 15 '17 at 17:17
  • 1
    @naugler In that case you can manually download it from https://api.github.com/repos/boot2docker/boot2docker/releases/latest . It is a very lightweight Linux distribution (~30 MB) to run Docker containers. Manually place it at `C:\Users\user_name\.docker\machine\cache` and it should work. – qwerty May 18 '17 at 06:29
  • downloading boot2docker manually and placing it in the ~/.docker/machine/cache directory solved it, thank you – naugler May 18 '17 at 21:55
  • @naugler glad it helped. I will update the answer with this. – qwerty May 18 '17 at 22:01
  • 2
    Then please add that the boot2docker VERSION must match the version linked in the installation for docker toolbox! http://stackoverflow.com/questions/24586573/docker-error-client-and-server-dont-have-same-version/36298911#36298911 – naugler May 18 '17 at 22:02
  • @naugler Please don't forget to upvote if the post really helped. – qwerty May 22 '17 at 04:17
-3

steps to deploy and run project using Docker:

  1. first install the docker in your machine. Because Docker is linux based environment then for windows it will give you docker with virtual machine “hyper-V Manager”. Download whole package for windows and install it: https://hub.docker.com/editions/community/docker-ce-desktop-windows

  2. once its install check it with following commands: https://docs.docker.com/docker-for-windows/

docker –version
docker container ls –all
  1. Add docker plugin in pom.xml and run following command to make image inside docker container: mvn package docker:build https://www.tutorialspoint.com/spring_boot/spring_boot_creating_docker_image.htm

  2. check all images :

docker image ls

  1. run your project image

docker run your_image_id

  1. it will run same like your spring project run only the port will be change like for me the changed port is

  2. Run your project apis from postman like bellow:

http://localhost:8085/name/alok

alok
  • 2,718
  • 21
  • 17