0
0

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 1 year has passed since last update.

GCE Container Optimize OSのtoolbox上でdocker on dockerする

Last updated at Posted at 2022-12-31

はじめに

COSはtoolbox上で必要ツールのインストールを行いますし、dockerもプリインストールされてるのであんまり困らないのですが、ふとtoolbox上でdocker on dockerしてみたらできたので備忘録残します。

まとめ

toolboxにdocker.sockをマウントさせたらdocker動くよ

手順

  • Container Optimeze OSを立ち上げる
  • 立ち上がったインスタンスにsshログインする
  • toolbox設定ファイルを変更する
sudo vim /etc/default/toolbox
# Copyright 2016 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

TOOLBOX_DOCKER_IMAGE="gcr.io/cos-cloud/toolbox"
TOOLBOX_DOCKER_TAG="v20220722"
# TOOLBOX_BIND="--bind=/:/media/root/ --bind=/mnt/disks/:/media/root/mnt/disks/ --bind=/var/:/media/root/var/ --bind=/home:/media/root/home/"
TOOLBOX_BIND="--bind=/:/media/root/ --bind=/mnt/disks/:/media/root/mnt/disks/ --bind=/var/:/media/root/var/ --bind=/home:/media/root/home/ --bind=/var/run/docker.sock:/var/run/docker.sock"
: ${USER:=root}
  • toolboxを立ち上げる
toolbox

enjoy!

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?