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?

Android(pixel 6a)ターミナル環境へDockerインストール

Posted at

はじめに

自分の備忘録のために調べたことと参照先をまとめていきたいです。

Android端末(現時点ではpixel限定)でterminalが使えるようになりました。
ちょっとしたSeleniumのツールだったり、Pythonの開発環境を移動中に作りたかったので本環境にDockerをインストールしました。

環境

  • 端末:pixel6a(Androidスマートフォン)
  • アプリ:ターミナル
pixel上のLinux仮想環境
#less /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

手順

参照:https://docs.docker.com/engine/install/ubuntu/

1.古いDockerアンインストール

念の為、削除コマンドを実行しておきます。

for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done

2.必要パッケージのインストール

インストールに必要なパッケージです。

sudo apt update
sudo apt install ca-certificates gnupg
  • ca-certificates
    ウェブサイトやその他のサービスが、ユーザーに安全な通信であることを保証するために発行されるデジタル証明書

  • gnupg
    データや通信を暗号化したり署名を付与したりする

3.Dockerインストール

公式サイトより以下手順でインストールします。

sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

Ubuntuのインストール手順を見ていて、リポジトリが見つからずコケて1日悩みました。よく見ないといけないですね…

4.確認

インストールがされたか確認する手順です。

sudo docker run hello-world

#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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?