Docker | Build Images

Contents Creating docker images basically means creating and editing Dockerfiles. These files are configurations files which contains all desired information to build a docker image. Build images Dockerfile Create a Dockerfile FROM ubuntu:17.10 # Update Ubuntu ENV DEBIAN_FRONTEND noninteractive RUN rm -rf /var/cache/apt/archives RUN apt-get -qq -y update 1>&- RUN apt-get -qq -y upgrade 1>&- RUN apt-get -qq -y –no-install-recommends install apt-utils 1>&- RUN apt-get -qq -y –no-install-recommends install ca-certificates curl 1>&- # Install Python.

Docker | Networks

Working with networks I’ve got a lot of inspiration from wsargent/docker-cheat-sheet. Goal We will setup to applications, each in his one container, running on the smae network, so they can communication together. Setup Starting with the default configuration, you will see 4 networks $ docker network ls NETWORK ID NAME DRIVER SCOPE 6742a11bff1e bridge bridge local 3af0a1c9eaac host host local e60f68aad9d6 none null local Create a bridged network for running two apps inside: web and

Docker | CheatSheet

Create new container Start a new docker image with a given name You can start a new container by using the run command and specify the desired image  $ docker run -it –name playground ubuntu:17.10 /bin/bash …. root@c106fbb48b20:/# exit As a result, you are in the container at the bash command line Reconnect to image $ docker attach playground Commit changes in container $ docker start playground $ docker attach playground root@c106fbb48b20:/# echo 1.0 >VERSION