LoginSignup
0
0

More than 5 years have passed since last update.

Docker Toolbox をProxy環境下で利用する。

Last updated at Posted at 2018-06-06

Virtual Boxを利用している既存の環境と共存するため、「Docker for Windows」を利用せず、「Docker Toolbox」を利用することにしましたが、
Proxy環境可だと結構苦戦したので、メモしておきます。

環境

Windows10
Docker toolbox

既存のdocker-machineを削除する

$ docker-machine rm -f default
About to remove default
WARNING: This action will delete both local reference and remote instance.
Successfully removed default

Windowsで以下になるように環境変数を設定する。

HTTP_PROXY=http://{proxy-server}:{port}/
HTTPS_PROXY=http://{proxy-server}:{port}/

proxy-serverとportは環境に合わせて適宜設定してください。

実行

Docker- Quickstart Terminalを実行してみましょう。

Running pre-create checks...

のようなメッセージがでて自動的に再設定してくれる模様です。

                        ##         .
                  ## ## ##        ==
               ## ## ## ## ##    ===
           /"""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
           \______ o           __/
             \    \         __/
              \____\_______/

docker is configured to use the default machine with IP 192.168.99.102
For help getting started, check out the docs at https://docs.docker.com

Start interactive shell

はい。無事いつもの画面が表示されました。

確認

で、Hello world

$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
9bb5a5d4561a: Pull complete
Digest: sha256:f5233545e43561214ca4891fd1157e1c3c563316ed8e237750d59bde73361e77
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

はい。無事完了しました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0