mopaex.blogg.se

Docker image centos 7
Docker image centos 7






We can get an interactive shell session to the container using the 'docker exec' command. I also mapped host port 80 to the port 80 of the new container. docker run -d -name docker-httpd -p 80:80 httpd:latestĪs per the above example, I started a new container called docker-httpd using the httpd image. Then, Start a new Docker Container with the 'docker run' command. Package version: docker-1.12.x86_64Ĭreate your first docker container on CentOS 7įor this example, I will run the Apache HTTPD Web Server on CentOS Docker Engine.įirst, Download the latest Apache httpd image using the 'docker pull' command. You should see the output something like the following: Client: To verify CentOS 7 Docker Installation, Type: docker version To install docker, Open the terminal and type: yum install docker docker-registryĪfter the installation is finished, start the docker service and enable to start docker automatically when system reboot. We will install the docker engine available from the CentOS Base repository.








Docker image centos 7