How To Update/Upgrade Docker on Fedora 23

Docker is a container-based software framework, commonly used for automating deployment of applications. Containers are encapsulated, lightweight, and portable application modules.

Pre-Flight Check

  • These instructions are specifically intended for upgrading/updating Docker on Fedora 23. If you’re using an older version of Fedora, check our tutorial for Fedora 22.
  • We’ll be logging into a Liquid Web Self Managed Fedora 23 server as root.

Step #1: Upgrade/Update Docker on Fedora 23

To upgrade or update, simply enter:

dnf upgrade -y docker-io

Step #2: Other Docker Commands

Docker already should be started, but if it isn’t you can start it with the following command:

systemctl start docker

Docker also already should be configured to start when the server boots; if not, you can use the following command to do so:

systemctl enable docker

Step #3: Download a Docker Container

To get started using Docker, we’ll download the Fedora Docker image:

docker pull fedora

Step #4: Run a Docker Container

Setting up a basic Fedora container with a bash shell requires a single command, “docker”:

docker run -i -t fedora /bin/bash

Breaking down that command:

  • docker run will run a command in a new container
  • -i attaches stdin and stdout
  • -t allocates a tty
  • fedora indicates that we’ll be using the standard fedora container
  • /bin/bash provides us with our shell

That’s it! You’re now using a bash shell inside of a Fedora Docker container.

To disconnect, or detach, from the shell without exiting, use the escape sequence: Ctrl + p followed by Ctrl + q.

You can easily search for other community containers. Here, we are searching for the keyword “fedora”:

docker search fedora

Step #5: Get More Out of Docker

Learn more about Docker by reviewing the official documentation.
 

How To Install Docker on Fedora 23

Docker is a container-based software framework commonly used for automating deployment of applications. Containers are encapsulated, lightweight, and portable application modules.

Pre-Flight Check

  • These instructions are intended for installing Docker on Fedora 23. If you’re using an older version of Fedora or a different operating system, check our tutorials for Fedora 21 and Ubuntu 15.04.
  • We’ll be logging into a Liquid Web Self Managed Fedora 23 server as root.

Step #1: Install Docker on Fedora 23

As a matter of best practice, we’ll update our packages:

dnf update -y

We’ll install Docker by installing the docker-io package:

dnf -y install docker-io

Once the installation completes, we’ll need to start the Docker daemon:

systemctl start docker

Now we’ll configure Docker to start when the server boots:

systemctl enable docker

That should produce output similar to the following:

[root@host ~]# systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.

Step #2: Download a Docker Container

To get started using Docker, we’ll download the Fedora Docker image:

docker pull fedora

That should produce output similar to the following:

[root@host ~]# docker pull fedora
Using default tag: latest
Trying to pull repository docker.io/library/fedora ... latest: Pulling from library/fedora
369aca82a5c0: Pull complete
3fc68076e184: Pull complete
Digest: sha256:7d916d5d3ab2d92147e515d3c09cb47a0431e2fff9d550fd9bcc4fed379af9ea
Status: Downloaded newer image for docker.io/fedora:latest

Step #3: Run a Docker Container

Setting up a basic Fedora container with a bash shell requires a single command, “docker”:

docker run -i -t fedora /bin/bash

Breaking down that command:

  • docker run will run a command in a new container
  • -i attaches stdin and stdout
  • -t allocates a tty
  • fedora indicates that we’ll be using the standard Fedora container
  • /bin/bash provides us with our shell

That’s it! You’re now using a bash shell inside of a Fedora Docker container.

To disconnect, or detach, from the shell without exiting, use the escape sequence: Ctrl + p followed by Ctrl + q.

You can easily search for other community containers. Here, we are searching for the keyword “fedora”:

docker search fedora

Step #4: Get More Out of Docker

Learn more about Docker by reviewing the official documentation.
 

How to Upgrade / Update Docker on Fedora 22

Introduction

Docker is a container-based software framework commonly used for automating deployment of applications. “Containers” are encapsulated, lightweight, and portable application modules.

Pre-Flight Check

  • These instructions are intended for upgrading / updating Docker.
  • I’ll be working from a Liquid Web Self Managed Fedora 22 server, and I’ll be logged in as root.

Continue reading “How to Upgrade / Update Docker on Fedora 22”

How to Install Docker on Ubuntu 15.04

Introduction

Docker is a container-based software framework for automating deployment of applications. “Containers” are encapsulated, lightweight, and portable application modules.

Pre-Flight Check

  • These instructions are intended for installing Docker.
  • I’ll be working from a Liquid Web Self Managed Ubuntu 15.04 server, and I’ll be logged in as root.

Continue reading “How to Install Docker on Ubuntu 15.04”

How to Install Docker on Fedora 21

Introduction

Docker is a container-based software framework commonly used for automating deployment of applications. “Containers” are encapsulated, lightweight, and portable application modules.

Pre-Flight Check

  • These instructions are intended for installing Docker.
  • I’ll be working from a Liquid Web Self Managed Fedora 21 server, and I’ll be logged in as root.

Continue reading “How to Install Docker on Fedora 21”

How To Install Docker on Fedora 20

Introduction

Docker is a container-based software framework for automating deployment of applications. “Containers” are encapsulated, lightweight, and portable application modules.

Pre-Flight Check
  • These instructions are intended for installing Docker.
  • I’ll be working from a Liquid Web Self Managed Fedora 20 server, and I’ll be logged in as root.

Continue reading “How To Install Docker on Fedora 20”

How To Install Docker on CentOS 7

Introduction

Docker is a container-based software framework for automating deployment of applications. “Containers” are encapsulated, lightweight, and portable application modules.

Pre-Flight Check
  • As of June 2014 Docker has officially released v1.0.0.
  • These instructions are intended for installing Docker.
  • I’ll be working from a Liquid Web Self Managed CentOS 7 server, and I’ll be logged in as root.

Continue reading “How To Install Docker on CentOS 7”

How to Install Docker on Ubuntu 14.04 LTS

Introduction

Docker is a container-based software framework for automating deployment of applications. “Containers” are encapsulated, lightweight, and portable application modules.

Pre-Flight Check

  • These instructions are intended for installing Docker.
  • I’ll be working from a Liquid Web Core Managed Ubuntu 14.04 LTS server, and I’ll be logged in as root.

Continue reading “How to Install Docker on Ubuntu 14.04 LTS”

How to View Logs for a Docker Container

Pre-Flight Check
  • As of June 2014 Docker has officially released v1.0.0.
  • These instructions are intended for viewing logs for Docker containers.
  • I’ll be working from a Liquid Web Core Managed CentOS 6.6 server (or CentOS 7, Ubuntu 14.04 LTS, Fedora 20, Fedora 21), and I’ll be logged in as root.

Continue reading “How to View Logs for a Docker Container”

How to Commit Changes and Create Docker Images

Pre-Flight Check
  • As of June 2014 Docker has officially released v1.0.0.
  • These instructions are intended for committing changes to Docker containers.
  • I’ll be working from a Liquid Web Core Managed CentOS 6.6 server (or CentOS 7, Ubuntu 14.04 LTS, Fedora 20, Fedora 21), and I’ll be logged in as root.
  • In the previous tutorials in this series we’ve installed Docker and got a container running, and then we listed which containers were running, and attached to a running Fedora container.

Continue reading “How to Commit Changes and Create Docker Images”