3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CoreOS で Docker デーモンの起動オプション DOCKER_OPTS を設定する

Posted at

CoreOS は何もしなくとも自動で Docker デーモンが立ち上がりますが、たまに Docker デーモン自体の起動オプション (DOCKER_OPTS) を設定したい時があります。Docker デーモンへのアクセスには TLS 認証使いたいとか、overlay network を使うための下準備をしたいとかです。

そういう時は、cloud-config の unitsdocker.service を記述することで Docker デーモンの起動時に DOCKER_OPTS を設定できます。
以下の例では、etcd を利用した overlay network 構築 のオプションを指定しています。

coreos:
  units:
    - name: etcd2.service
      command: start
    - name: docker.service # <=====
      drop-ins:
        - name: 10-cluster-config.conf
          content: |
            [Service]
            Environment="DOCKER_OPTS=--cluster-store=etcd://0.0.0.0:2379 --cluster-advertise=eth0:2375"

REF

3
3
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
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?