Blog Archives

Docker tutorials 7: installing Apache2 on docker (on a Mac) – part 2: using a Dockerfile

We can now apply what we learned in Tutorial 6 by using the Dockerfile techniques we discussed in Tutorial 3. We had the following Dockerfile: FROM ubuntu:latest MAINTAINER myname <myname@mydomain.com> RUN apt-get update RUN apt-get -y upgrade CMD /bin/bash We now need

Tagged with: ,
Posted in Docker

Docker tutorials 6: installing Apache2 on docker (on a Mac) – part 1

We need to install apache2 on the container start it access its port (80) Now things get a bit complex: remember that on a Mac we need to run a VirtualBox to have a Linux VM onto which docker acts.

Tagged with: ,
Posted in Docker

Docker tutorials 5: sharing a portion of the file system with docker

1) Create a directory that will be shared with the docker machine, and let su create a file in it mkdir mySharedDirectory cat > mySharedDirectory/myFile hello ^D 2a) Let us assume we have an image like the one created in

Tagged with:
Posted in Docker

Docker tutorials 4: image management

In tutorial 3 we have seen how to build an image, now let’s see how to manage them. Let’s assume we have some images at hand: docker images REPOSITORY                     TAG                 IMAGE ID           CREATED             SIZE myname                        myLinux2           50ee9e4f504d       13 minutes ago    

Tagged with:
Posted in Docker

Docker tutorials 3: creating an image with a Dockerfile

We will do the same creation process as in tutorial 1 by using a Dockerfile. By using any editor, let’s create in our working directory in the host machine a file named Dockerfile with the following content: FROM ubuntu:latest MAINTAINER myname

Tagged with:
Posted in Docker

Docker tutorials 2: managing containers

As we have seen in Tutorial 1, we can check which containers are alive docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES Nothing alive is in there. We then look for “sleeping” docker machines: docker ps -a CONTAINER

Posted in Docker, Uncategorized

Docker tutorials 1: example of creating a linux box into docker

Note: We’ll call “docker machine” the environment we create inside docker, which will look like another linux box we can control. Later on, when we get familiar with the idea, we’ll also call it “the container”. Red lines are run

Posted in Docker, Uncategorized