티스토리 뷰

반응형

Docker is working based on Linux kernel, but we can use docker in window as well using docker-machine. Docker-machine is a tool for provisioning and managing your Dockerized hosts. Typically, you install Docker Machine on your local system. Docker machine has its own command line client and the Docker Engine client. You can use Machine to install Docker Engine on one or more virtual systems. Theses virtual systems can be local or remote. But there is some problems linux developer like me. Due to lack of packages in command line in windows I am not satisfied to use it for developing. I need environment to install some of packages like golang, gcc library and so on to build and make own app containers on windows. The first approach is to install ubuntu in my PC as dual boot mode. I think it's pretty big burden in my laptop with windows. How to set up my environment to use docker properly in windows without installing full of linux? I found the way from google that so genius!!.

Let's see the achitecture how it works with ubuntu app and docker-machine. I have already installed docker-machine to use docker which can be interfaced with DOCKER_HOST value. Docker client is located in Window host as exe file and docker daemon is running on virtual box. Like this way, ubuntu app I would install in windows 10 and install docker using apt-get. Before jumping on this step, once I will indicate how to install ubuntu app in windows 10.

In store of windows 10, I can find Ubuntu but it requires to be installed higher windows 10 released version to work properly. It would not be stable but I had installed to use ubuntu app to set up these environment. As well as we need to turn on functionalities of linux in the below menu.

Once, run docker-machine to use docker daemon. See the below image how it works.

Run ubuntu app that It was installed.

See the command line it looks like real ubuntu.

Also, I added variable in .bashrc to be affected.

export PATH=$PATH:/usr/local/go/bin/

export GOPATH=/home/namsulee/source/goproject

export PATH=$PATH:$(go env GOPATH)/bin

export DOCKER_HOST="tcp://192.168.99.100:2376"

export DOCKER_TLS_VERIFY="1"

 

The important thing is DOCKER_HOST which is giving from docker-machine.

If you done all of this, check 'docker ps' and 'docker info' how it will be printed.

You can see proper return that you expect!!!

Here is my question in order to be cleared why docker is not working in ubuntu. Because many stuff docker needs to use from kernel, ubuntu app is not able to support yet.

But If you guarantee internet connection, you would use docker play ground where everything is installed.

You can use it both whatever you want!!

반응형

'Technology > AWS, Docker' 카테고리의 다른 글

AWS API Gateway 제대로 써보자 2  (0) 2022.12.06
AWS API Gateway 제대로 써보자 1  (0) 2022.12.06
Serverless 는 서버가 있다? 없다?  (0) 2022.12.05
Docker 주요 사용 명령어 정리  (0) 2022.12.04
Start Docker,  (0) 2017.07.15
댓글