II. How To List and Attach to Docker Containers
III. How to Commit Changes and Create Docker Images
IV. How to View Logs for a Docker Container
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.
Related Articles:
- How to Edit the PHP Memory for Your WordPress Site via WP Toolkit
- 4 Methods for How to Install Yarn on Windows Server
- How to Install Bpytop Resource Monitoring Tool on AlmaLinux
- How to Fix “This Site Can’t Provide a Secure Connection” Error
- How to Install MongoDB on AlmaLinux
- How to Install PostgreSQL on AlmaLinux
About the Author: dpepper
Our Sales and Support teams are available 24 hours by phone or e-mail to assist.
Latest Articles
How to Edit the PHP Memory for Your WordPress Site via WP Toolkit
Read ArticleWhat is CGI-Bin and What Does it Do?
Read ArticleTop 10 Password Security Standards
Read ArticleTop 10 Password Security Standards
Read ArticleHow to Use the WP Toolkit to Secure and Update WordPress
Read Article