-
Notifications
You must be signed in to change notification settings - Fork 4
/
617.txt
33 lines (27 loc) · 1.31 KB
/
617.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[FIG(quote)[
[FIGCAPTION[
[1] [CITE@en[lukecyca/travis-docker-example]]
([TIME[2015-03-01 23:50:19 +09:00]] 版)
<https://github.com/lukecyca/travis-docker-example>
]FIGCAPTION]
> Proof of concept for running docker in a Travis CI build
]FIG]
[2] [CITE@ja[【翻訳】いいDockerイメージを構築するには? ーDockerfileのベストプラクティス | POSTD]]
([TIME[2015-03-02 00:03:21 +09:00]] 版)
<http://postd.cc/building-good-docker-images/>
[3] [[Docker]] [[container]] 内から[[ホスト]] (外側) に [[TCP/IP]]
でアクセスしたい時は、
[PRE(code)[
$ docker run --add-host=dockerhost:$(ip route | awk '/docker0/ { print $NF }') -i -t debian:sid /bin/bash
]PRE]
... のように [CODE[--add-host]] オプションを指定すると、ホスト名
[CODE[dockerhost]] が [CODE[/etc/hosts]] に追加されますので、この名前でアクセスできます。
;; 参考:
[REFS[
- [4] [CITE@en[Proposal: Hostname in /etc/hosts pointing to the host · Issue #10023 · docker/docker]]
([TIME[2015-03-02 16:49:42 +09:00]] 版)
<https://github.com/docker/docker/issues/10023>
- [5] [CITE@en[Document how to connect to Docker host from container · Issue #1143 · docker/docker]]
([TIME[2015-03-02 16:49:48 +09:00]] 版)
<https://github.com/docker/docker/issues/1143>
]REFS]