Tuesday, May 15, 2018

playing Docker on ubuntu 18.04 LTS

# update package list:
$ sudo apt update

# installation:
$ sudo apt install docker

# by now, docker is sudo only.  if want to skip that 'sudo'
$ sudo groupadd docker
$ sudo useradd -aG docker $USER
doc said logout and re-login... i found it requires restarting.

# test environment, run helloworld
$ docker run hello-world
# will pull first if image not yet existed.



##  examples


# try node.js
$ docker pull node   # see online slim version
...
$ docker run node   # run and end and return
$ docker run -td node  # run in a new (t)ty, and (d)etached, end and return
$ docker run -it node   # run in a new (t)ty, (i)nteractively - prompt node's '>', ctrl-d to exit

# list downloaded images
$ docker images

# docker --help


Labels: , , , , , , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home