Skip to main content
本文に 553 文字追加
ソース リンク

ちなみにdockerの環境は以下のようにして構築しました

sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io

ちなみにdockerの環境は以下のようにして構築しました

sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io
本文に 1080 文字追加
ソース リンク

$ docker ps
CONTAINER ID   IMAGE          COMMAND   CREATED       STATUS         PORTS                                       NAMES
f370c9214bf8   ubuntu:20.04   "bash"    2 hours ago   Up 6 seconds   0.0.0.0:8080->8080/tcp, :::8080->8080/tcp   jovial_elgamal

$ systemctl status docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2021-09-12 19:26:33 JST; 6 days ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 3205 (dockerd)
      Tasks: 37
     Memory: 146.9M
     CGroup: /system.slice/docker.service
             ├─   3205 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
             ├─3029807 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8080 -container-ip 172.17.0.2 -container-port 8080
             └─3029813 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8080 -container-ip 172.17.0.2 -container-port 8080


$ docker ps
CONTAINER ID   IMAGE          COMMAND   CREATED       STATUS         PORTS                                       NAMES
f370c9214bf8   ubuntu:20.04   "bash"    2 hours ago   Up 6 seconds   0.0.0.0:8080->8080/tcp, :::8080->8080/tcp   jovial_elgamal

$ systemctl status docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2021-09-12 19:26:33 JST; 6 days ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 3205 (dockerd)
      Tasks: 37
     Memory: 146.9M
     CGroup: /system.slice/docker.service
             ├─   3205 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
             ├─3029807 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8080 -container-ip 172.17.0.2 -container-port 8080
             └─3029813 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8080 -container-ip 172.17.0.2 -container-port 8080

タイトルを編集
リンク

dockerでport forwardingがうまくいかない(flask)

ソース リンク
読み込んでいます