[docker] docker-composeを始める

version: "2"
services:
  ub-test:
    image: ubuntu

$ sudo docker-compose up
$ sudo docker compose logs
$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7d08f238d9f1 ubuntu “bash” About a minute ago Exited (0) About a minute ago basic_ub-test_1

version: "2"
services:
  ub-test:
    image: ubuntu
    tty: true
    stdin_open: true

    command: /bin/bash

$ sudo docker-compose run ub-test
root@dfbf7a227bd6:/# exit