Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save akagaeng/54add2be4f8708dc07cf5e25a073058a to your computer and use it in GitHub Desktop.
Save akagaeng/54add2be4f8708dc07cf5e25a073058a to your computer and use it in GitHub Desktop.
Setting up Ubuntu 16.04 LTS container with docker

Setting up Ubuntu 16.04 LTS container with docker

Prerequisite

Run ubuntu 16.04

$ docker run -it -w="/home" --name ubuntu1604 ubuntu:16.04 /bin/bash

Options

  • -it: interactive
  • -w: workdir
  • --name: set container name
  • --rm: remove after process exited

Useful commands

$ docker ps  # see running containers
$ docker pa -a  # see running/stopped containers
$ docker stop <container name / ID>  # stop container
$ docker rm <container name / ID>  # remove stopped container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment