Using Docker On Linux

Most Docker use cases involve deploying applications on servers. But Docker also can be a great tool for a desktop Linux system. I know: Most folks don’t use desktop Linux. Even developers who create applications to run on Linux servers typically use Windows or macOS systems for their work.

  1. Using Docker On Linux Download
  2. Using Linux Docker On Windows
  3. Using Docker On Linux Commands
-->

This step-by-step guide will help you get started developing with remote containers by setting up Docker Desktop for Windows with WSL 2 (Windows Subsystem for Linux, version 2).

Docker Desktop for Windows provides a development environment for building, shipping, and running dockerized apps. By enabling the WSL 2 based engine, you can run both Linux and Windows containers in Docker Desktop on the same machine. (Docker Desktop is free for personal use and small businesses, for info on Pro, Team, or Business pricing, see the Docker site FAQs).

Overview of Docker containers

Docker is a tool used to create, deploy, and run applications using containers. Containers enable developers to package an app with all of the parts it needs (libraries, frameworks, dependencies, etc) and ship it all out as one package. Using a container ensures that the app will run the same regardless of any customized settings or previously installed libraries on the computer running it that could differ from the machine that was used to write and test the app's code. This permits developers to focus on writing code without worrying about the system that code will be run on.

  1. Installation Instructions for Ubuntu. The simplest way to get docker, other than using the pre-built application image, is to go with a 64-bit Ubuntu 14.04 VPS. Update your droplet: sudo apt-get update sudo apt-get -y upgrade. Make sure aufs support is available: sudo apt-get install linux-image-extra-`uname -r`.
  2. Nov 17, 2017 The Docker installation command is: sudo apt install docker.io. If you’re using a different Linux distribution, and you attempt to install (using your distribution’s package manager of choice), only to find out docker.io isn’t available, the package you want to install is called docker. For instance, the installation on Fedora would be.
  3. Docker is an open-source platform for Linux system administrators and developers where you can build and run programs using a distributed Linux system. The working mechanism of Docker is using it as a container.
  4. Move existing Windows C# workloads to Linux and Docker; Start fresh with C# on Linux; Containerize an existing ASP.NET Core or.NET Core app; Move Windows Workloads to Linux and Docker. Legacy enterprise solutions tend to use the full.NET 4.5.x framework. The stack is powerful, but built in a time when we had 1 huge program running on a huge.

Docker containers are similar to virtual machines, but don't create an entire virtual operating system. Instead, Docker enables the app to use the same Linux kernel as the system that it's running on. This allows the app package to only require parts not already on the host computer, reducing the package size and improving performance.

Continuous availability, using Docker containers with tools like Kubernetes, is another reason for the popularity of containers. This enables multiple versions of your app container to be created at different times. Rather than needing to take down an entire system for updates or maintenance, each container (and it's specific microservices) can be replaced on the fly. You can prepare a new container with all of your updates, set up the container for production, and just point to the new container once it's ready. You can also archive different versions of your app using containers and keep them running as a safety fallback if needed.

To learn more, checkout the Introduction to Docker containers on Microsoft Learn.

Prerequisites

Using Docker On Linux Download

  • Ensure your machine is running Windows 10, updated to version 2004, Build 18362 or higher.
  • Install WSL and set up a user name and password for your Linux distribution running in WSL 2.
  • Install Visual Studio Code(optional). This will provide the best experience, including the ability to code and debug inside a remote Docker container and connected to your Linux distribution.
  • Install Windows Terminal(optional). This will provide the best experience, including the ability to customize and open multiple terminals in the same interface (including Ubuntu, Debian, PowerShell, Azure CLI, or whatever you prefer to use).
  • Sign up for a Docker ID at Docker Hub(optional).

Note

WSL can run distributions in both WSL version 1 or WSL 2 mode. You can check this by opening PowerShell and entering: wsl -l -v. Ensure that the your distribution is set to use WSL 2 by entering: wsl --set-version <distro> 2. Replace <distro> with the distro name (e.g. Ubuntu 18.04).

In WSL version 1, due to fundamental differences between Windows and Linux, the Docker Engine couldn't run directly inside WSL, so the Docker team developed an alternative solution using Hyper-V VMs and LinuxKit. However, since WSL 2 now runs on a Linux kernel with full system call capacity, Docker can fully run in WSL 2. This means that Linux containers can run natively without emulation, resulting in better performance and interoperability between your Windows and Linux tools.

Install Docker Desktop

With the WSL 2 backend supported in Docker Desktop for Windows, you can work in a Linux-based development environment and build Linux-based containers, while using Visual Studio Code for code editing and debugging, and running your container in the Microsoft Edge browser on Windows.

To install Docker (after already installing WSL):

  1. Download Docker Desktop and follow the installation instructions.

  2. Once installed, start Docker Desktop from the Windows Start menu, then select the Docker icon from the hidden icons menu of your taskbar. Right-click the icon to display the Docker commands menu and select 'Settings'.

  3. Ensure that 'Use the WSL 2 based engine' is checked in Settings > General.

  4. Select from your installed WSL 2 distributions which you want to enable Docker integration on by going to: Settings > Resources > WSL Integration.

  5. To confirm that Docker has been installed, open a WSL distribution (e.g. Ubuntu) and display the version and build number by entering: docker --version

  6. Test that your installation works correctly by running a simple built-in Docker image using: docker run hello-world

Tip

Here are a few helpful Docker commands to know:

  • List the commands available in the Docker CLI by entering: docker
  • List information for a specific command with: docker <COMMAND> --help
  • List the docker images on your machine (which is just the hello-world image at this point), with: docker image ls --all
  • List the containers on your machine, with: docker container ls --all or docker ps -a (without the -a show all flag, only running containers will be displayed)
  • List system-wide information regarding the Docker installation, including statistics and resources (CPU & memory) available to you in the WSL 2 context, with: docker info

Develop in remote containers using VS Code

To get started developing apps using Docker with WSL 2, we recommend using VS Code, along with the Remote-WSL extension and Docker extension.

  • Install the VS Code Remote-WSL extension. This extension enables you to open your Linux project running on WSL in VS Code (no need to worry about pathing issues, binary compatibility, or other cross-OS challenges).

  • Install the VS code Remote-Containers extension. This extension enables you to open your project folder or repo inside of a container, taking advantage of Visual Studio Code's full feature set to do your development work within the container.

  • Install the VS Code Docker extension. This extension adds the functionality to build, manage, and deploy containerized applications from inside VS Code. (You need the Remote-Container extension to actually use the container as your dev environment.)

Let's use Docker to create a development container for an existing app project.

  1. For this example, I'll use the source code from my Hello World tutorial for Django in the Python development environment set up docs. You can skip this step if you prefer to use your own project source code. To download my HelloWorld-Django web app from GitHub, open a WSL terminal (Ubuntu for example) and enter: git clone https://github.com/mattwojo/helloworld-django.git

    Note

    Always store your code in the same file system that you're using tools in. This will result in faster file access performance. In this example, we are using a Linux distro (Ubuntu) and want to store our project files on the WSL file system wsl. Storing project files on the Windows file system would significantly slow things down when using Linux tools in WSL to access those files.

  2. From your WSL terminal, change directories to the source code folder for this project:

  3. Open the project in VS Code running on the local Remote-WSL extension server by entering:

    Confirm that you are connected to your WSL Linux distro by checking the green remote indicator in the bottom-left corner of your VS Code instance.

  4. From the VS Code command pallette (Ctrl + Shift + P), enter: Remote-Containers: Open Folder in Container... If this command doesn't display as you begin to type it, check to ensure that you've installed the Remote Container extension linked above.

  5. Select the project folder that you wish to containerize. In my case, this is wslUbuntu-20.04homemattwojoreposhelloworld-django

  6. A list of container definitions will appear, since there is no DevContainer configuration in the project folder (repo) yet. The list of container configuration definitions that appears is filtered based on your project type. For my Django project, I'll select Python 3.

  7. A new instance of VS Code will open, begin building our new image, and once the build completed, will start our container. You will see that a new .devcontainer folder has appeared with container configuration information inside a Dockerfile and devcontainer.json file.

  8. To confirm that your project is still connected to both WSL and within a container, open the VS Code integrated terminal (Ctrl + Shift + ~). Check the operating system by entering: uname and the Python version with: python3 --version. You can see that the uname came back as 'Linux', so you are still connected to the WSL 2 engine, and Python version number will be based on the container config that may differ from the Python version installed on your WSL distribution.

  9. To run and debug your app inside of the container using Visual Studio Code, first open the Run menu (Ctrl+Shift+D or select the tab on the far left menu bar). Then select Run and Debug to select a debug configuration and choose the configuration that best suites your project (in my example, this will be 'Django'). This will create a launch.json file in the .vscode folder of your project with instructions on how to run your app.

  10. From inside VS Code, select Run > Start debugging (or just press the F5 key). This will open a terminal inside VS Code and you should see a result saying something like: 'Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C.' Hold down the Control key and select the address displayed to open your app in your default web browser and see your project running inside of its container.

You have now successfully configured a remote development container using Docker Desktop, powered by the WSL 2 backend, that you can code in, build, run, deploy, or debug using VS Code!

Troubleshooting

WSL docker context deprecated

If you were using an early Tech Preview of Docker for WSL, you may have a Docker context called 'wsl' that is now deprecated and no longer used. You can check with the command: docker context ls. You can remove this 'wsl' context to avoid errors with the command: docker context rm wsl as you want to use the default context for both Windows and WSL2.

Possible errors you might encounter with this deprecated wsl context include: docker wsl open //./pipe/docker_wsl: The system cannot find the file specified. or error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_wsl/v1.40/images/json?all=1: open //./pipe/docker_wsl: The system cannot find the file specified.

For more on this issue, see How to set up Docker within Windows System for Linux (WSL2) on Windows 10.

Trouble finding docker image storage folder

Docker creates two distro folders to store data:

  • wsl$docker-desktop
  • wsl$docker-desktop-data

You can find these folders by opening your WSL Linux distribution and entering: explorer.exe . to view the folder in Windows File Explorer. Enter: wsl<distro name>mntwsl replacing <distro name> with the name of your distribution (ie. Ubuntu-20.04) to see these folders.

Find more on locating docker storage locations in WSL, see this issue from the WSL repo or this StackOverlow post.

For more help with general troubleshooting issues in WSL, see the Troubleshooting doc.

Additional resources

Install Oracle JDK 8 on any Linux distribution (Debian, Ubuntu, Linux Mint, Fedora, CentOS, Arch, Manjaro, OpenSUSE) using the tar.gz file. To install Docker, we need to follow the steps given below. Step 1 − Before installing Docker, you first have to ensure that you have the right Linux kernel version running. Docker is only designed to run on Linux kernel version 3.8 and higher. We can do this by running the following command. This tutorial will help you to install Java 11 or Java 8 on the Amazon Linux system. As of now, Oracle has restricted these Java versions for registered users only, we will use OpenJDK for this installation. Step 1 – Install Java on Amazon Linux The OpenJDK 8 is available under default yum repositories and.

8i 9i 10g 11g 12c 13c 18c 19c 21c Misc PL/SQL SQL RAC WebLogic Linux

Home » Articles » Linux » Here

  • RHCSA and RHCE

Database Installation Matrix

For installations on RHEL clones, like Oracle Linux and CentOS, use the instructions provided below for the appropriate RHEL release.

OS9i10gR110gR211gR111gR212cR112cR218c19c
Red Hat Enterprise Linux 2.1 (RHEL2)herehere
Red Hat Enterprise Linux 3 (RHEL3)hereherehere
Enterprise Linux 4
(RHEL4 * OEL4)
hereherehere
RAC + VMware 1.x
RAC + NFS
here
Enterprise Linux 5
(RHEL5 * OL5)
herehere
RAC + VMware 1.x
RAC + VMware 2
RAC + NFS
here
RAC + VirtualBox
RAC + VMware 2
RAC + NFS
here
Oracle Linux 6 (OL6)here
RAC + VirtualBox
here
RAC + VirtualBox
RAC + NFS
here
RAC + VirtualBox
here
Oracle Linux 7 (OL7)herehere
RAC + VirtualBox
RAC + NFS
here
RAC + VirtualBox
here
RAC + VirtualBox
here
RAC + VirtualBox
Oracle Linux 8 (OL8)hereherehere
RAC + VirtualBox
Red Hat 8here
Red Hat 9here
Fedora Core 1 (FC1)herehere
Fedora Core 2 (FC2)here
Fedora Core 3 (FC3)herehere
Fedora Core 4 (FC4)herehere
Fedora Core 5 (FC5)here
Fedora Core 6 (FC6)here
Fedora 7 (F7)herehere
Fedora 8 (F8)here
Fedora 9 (F9)here
Fedora 10 (F10)here
Fedora 11 (F11)here
Fedora 12 (F12)here
Fedora 13 (F13)here
Fedora 14 (F14)here
Fedora 15 (F15)here
Fedora 16 (F16)here
Fedora 17 (F17)here
Fedora 18 (F18)herehere
Fedora 19 (F19)herehere
Fedora 20 (F20)herehere
Fedora 21 (F21)herehere
Fedora 22 (F22)herehere
Fedora 23 (F23)herehere
Fedora 24 (F24)here
Fedora 25 (F25)herehere
Fedora 26 (F26)herehere
Fedora 27 (F27)here
Fedora 28 (F28)herehere
Fedora 29 (F29)hereherehere
Fedora 30 (F30)herehere
Fedora 31 (F31)herehere
Fedora 32 (F32)here

Application Server Installation Matrix

For installations on RHEL clones, like Oracle Linux and CentOS, use the instructions provided below for the appropriate RHEL release.

OS9iASAS10g R1AS10g R2AS10g R3WebLogic 11gWebLogic 12cR1
(12.1.1)
WebLogic 12cR1
(12.1.2)
WebLogic 12cR1
(12.1.3)
WebLogic 12cR2
(12.2.1)
Red Hat Enterprise Linux 2.1 (RHEL2)herehere
Red Hat Enterprise Linux 3 (RHEL3)hereherehere
Red Hat Enterprise Linux 4 (RHEL4)here
Oracle Linux 5 (OL5)herehereherehere
Oracle Linux 6 (OL6)hereherehereherehere
Oracle Linux 7 (OL7)here
Fedora Core 1 (FC1)here
Fedora Core 2 (FC2)here
Fedora Core 5 (FC5)here
Fedora Core 6 (FC6)here

Enterprise Manager Grid Control Installation Matrix

For installations on RHEL clones, like Oracle Linux and CentOS, use the instructions provided below for the appropriate RHEL release.

OS10g R110g R210g R511g R112c R112c R212c R312c R412c R513c R113c R213c R3
Red Hat Enterprise Linux 3herehere
Red Hat Enterprise Linux 4herehere
Oracle Linux 5hereherehereherehereherehere
Oracle Linux 6herehereherehereherehereherehere
Oracle Linux 7hereherehere

Operating System Installations

These articles provide a pictorial guide for performing an installation of Oracle linux.

These articles provide a pictorial guide for performing an installation of RHEL.

These articles provide a pictorial guide for performing an installation of Fedora.

Here are some miscellaneous installation articles.

Miscellaneous Articles

Apache Tomcat 6 Installation on Linux (RHEL and clones) - A guide to installation of Apache Tomcat 6 on RHEL and its clones.

Apache Tomcat 7 Installation on Linux (RHEL and clones) - A guide to installation of Apache Tomcat 7 on RHEL and its clones.

Apache Tomcat 8 Installation on Linux (RHEL and clones) - A guide to installation of Apache Tomcat 8 on RHEL and its clones.

Apache Tomcat 9 Installation on Linux (RHEL and clones) - A guide to installation of Apache Tomcat 9 on RHEL and its clones.

Apache Tomcat : Default Redirect - This article explains how to perform a default redirect from the root location on an Apache Tomcat installation to a specific page.

Apache Tomcat : Enable HTTPS - This article show how to enable HTTPS for Tomcat. It uses a self-signed certificate, but you could replace this with a valid Certificate Authority (CA) certificate.

Automating Database Startup and Shutdown on Linux - Use these methods to automatically startup and shutdown your database instances when your system starts and stops.

ASM using ASMLib and Raw Devices - Set up ASM using raw devices or ASMLib and switch between the two.

Configuring HugePages for Oracle on Linux (x86-64) - This article explains how to configure HugePages for Oracle on Linux (x86-64).

Convert RHEL 5.x to Oracle Linux 5.x - Follow this procedure to convert a RHEL5 installation to an Oracle Linux 5 installation.

Configuring Software RAID on Oracle Linux 6 - This article describes the steps required to configure software RAID on Oracle Linux 6.

Configuring VNC Server on Linux - This article describes how to configure VNC Server on a Linux using both the init and systemd methods.

Configuring the Alcatel SpeedTouch USB modem on RedHat 7.3 - 9.0 and Fedora - A guide to configuring an ADSL connection on RedHat and Fedora Linux using the Alcatel SpeedTouch USB modem.

Create a Local Yum Repository for Oracle Linux 6 - Learn how to create a local Yum repository for Oracle Linux 6.

Create a Local Yum Repository for Oracle Linux 7 - Learn how to create a local Yum repository for Oracle Linux 7.

Create a Local Yum Repository for Oracle Linux 8 - Learn how to create a local Yum repository for Oracle Linux 8.

Create an ODBC Data Source Name (DSN) on Linux - This article describes how to create an ODBC data source name (DSN) on Linux.

Create Self-Signed SSL Certificates - Notes on how to create self-signed SSL certificates using a variety of methods.

Direct and Asynchronous I/O - Take advantage of the performance advantages associated with Direct and Asynchronous I/O.

DNS Configuration for the SCAN used with Oracle RAC Database 11g Release 2 - A basic description of the DNS configuration required for the SCAN associated with an Oracle RAC database in 11g Release 2.

Dnsmasq : For Simple DNS Configurations - Learn how to use Dnsmasq, rather than BIND, for simple DNS configurations.

Download the Latest Oracle Linux Repo File - A brief description of how to get the latest repository files for Oracle Linux.

Fedora DNF System Upgrade - The article explains how to upgrade a Fedora installation using the DNF.

Git 2.x Installation on Linux - This article describes the manual installation of Git 2.x on Linux.

Git Cheat Sheet - A few of the Git commands I find myself using all the time.

GNU Screen Utility - The GNU screen utility allows you to protect long running processes from being killed by network failures.

JRockit Installation on Linux - A quick guide to installing the JRockit JDK on Linux.

Kickstart - Automated Installations of Red Hat Enterprise Linux - Save time by automating the installation and post installation configuration of Linux.

Large SGA On Linux - Configure a shared memory file system (shmfs) to allow large SGA sizes on Linux.

Let's Encrypt - Free Certificates on Oracle Linux (CertBot) - This article shows you how to use Let's Encrypt to get free certificates for publicly facing web servers.

Linux Antivirus (clamav, freshclam, clamscan, clamtk) - Install and use ClamAV, the free and simple antivirus software for Linux.

Linux Automatic or Timed Login (Oracle Linux, RHEL, CentOS) - Using automatic login or timed login on a server or your main PC is a really bad idea, but you might want to use this feature on a test VM.

Linux Scripts Running in the Background - This articles gives a brief explanation of running scripts in the background.

Manual Oracle Uninstall - Having trouble removing all Oracle software using the OUI? Try these methods.

NIC Channel Bonding in RHEL 5 & 6 (CentOS & Oracle Linux) - Use NIC channel bonding to enable multiple network interfaces to act as one.

OCFS2 On Linux - Use OCFS2 to create cluster file systems on Linux.

Oracle Linux : Frequently Asked Questions (FAQs) - Answers to some of the common questions about Oracle Linux.

OS Backup Commands - A summary of the operating system backup commands you might encounter whilst backing up Oracle databases.

PXE Network Installations (RHEL5 / OL5) - A brief run through the steps necessary to enable PXE network installations of RHEL5 and Oracle Linux 5.

PXE Network Installations (RHEL6 / OL6) - A guide to setting up a PXE server to enable PXE network installations of RHEL6 and Oracle Linux 6.

rlwrap for Command Line History and Editing in SQL*Plus and RMAN on Linux - Add command line history and basic editing to SQL*Plus and RMAN on Linux.

Spacewalk : Installation on Oracle Linux - This article explains how to install Spacewalk on Oracle Linux. You do not need a support contract for Oracle Linux to use this method.

Using Linux Docker On Windows

Spacewalk : Basic Usage (Repositories, Channels and Clients) - An overview of using channels, repositories and clients in Spacewalk

SSH Tunnel (Port Forwarding) to access - This short post will demonstrate opening a SSH tunnel to get to a port on a remote server, which you don't have firewall access to reach.

UDEV SCSI Rules Configuration for ASM in Oracle Linux 5, 6, 7 and 8 - Setting up UDEV rules for SCSI disk ownership and permissions in Oracle Linux 5, 6, 7 and 8.

UNIX Commands For DBAs - A selection of UNIX/Linux commands including those for monitoring performance.

User Equivalence Configuration on Linux - This article describes two methods for configuring user equivalence on Linux.

Using NFS with ASM - This article describes how to use files presented using NFS as disks in ASM.

Vagrant : A Beginner's Guide - This article gives a very brief introduction to Vagrant.

Install and Configure a Gitlab Runner on Oracle Linux - This article describes how to install and configure a GitLab runner on Oracle Linux for use with CI/CD automation pipelines.

RHCSA and RHCE

RHCSA and RHCE 6 Certifications - An introduction to the series of articles that will be presented on this site covering the Red Hat Certified System Administration (RHCSA) and Red Hat Certified Engineer (RHCE) exams.

RHCSA

RHCSA Objectives - A complete list of the exam objectives, plus links to articles that cover them.

Oracle Linux 6 Installation - A pictorial guide for performing a default installation of Oracle Linux 6. Oracle Linux is a binary clone of RHEL, so the installation process is very similar.

Kickstart - Automated Installations of Red Hat Enterprise Linux.

PXE Network Installations (RHEL6 / OL6) - A guide to setting up a PXE server to enable PXE network installations of RHEL6 and Oracle Linux 6.

Configuring VNC Server on Linux - How to configure VNC Server on a Linux using both the init and systemd methods.

KVM Overview - An overview of KVM virtualization on Enterprise Linux 6.

Linux Disk Partitioning (fdisk, parted) - Disc partitioning utilities available in Linux.

Linux File Systems (mkfs, mount, fstab) - An introduction to Linux file systems.

Linux Logical Volume Management - An introduction to Logical Volume Management (LVM) in Linux.

Linux Unified Key Setup (LUKS) Encrypted File Systems - How to create and mount Linux Unified Key Setup (LUKS) encrypted file systems.

Linux Run Levels, Boot, Reboot, Shutdown - Linux run levels and boot, reboot and shutdown operations.

Installing Software Packages (rpm, yum) - An overview of the rpm and yum commands for installing software packages on Linux.

Linux

Linux Process Management (ps, top, renice, kill) - An introduction to some of the commands and utilities used to manage processes on Linux.

Linux Groups and Users - Create, modify and remove local groups and users on Linux.

Linux Files, Directories and Permissions - An overview of files, directories and permissions on Linux.

Linux Redirection And File Processing - Basic input and output redirection and file processing on Linux.

CRON : Scheduling Tasks on Linux - Learn how to scheduler tasks on Linux using CRON.

Access Remote Servers from Linux (ssh, vncviewer) - Learn how to access remote servers from Linux using SSH and VNC.

Linux Archive Tools (tar, star, gzip, bzip2, zip, cpio) - This article discusses the archiving tools available in Linux.

Using Docker On Linux Commands

Linux HTTP and FTP Server Configuration - Configure Default HTTP and FTP servers on Linux.

Linux Services (service, chkconfig, system-config-services) - This article describes the commands to manage services on Linux.

Linux Services (systemd, systemctl) - This article describes the commands to manage services on Linux systems using systemd.

Linux Network Configuration (system-config-network) - Learn how to configure networking on Linux.

Linux System Log Files - Identify the location of Linux system log files.

Linux Access Control Lists (ACLs) - Learn how to create and manage Access Control Lists (ACLs) on Linux.

Linux Firewall (iptables, system-config-firewall) - Perform basic firewall administration using iptables and system-config-firewall on Linux.

Linux Firewall (firewalld, firewall-cmd, firewall-config) - Perform basic firewall administration using firewall-cmd and firewall-config on Linux systems using firewalld.

Security-Enhanced Linux (SELinux) - Understand the basic concepts of Security-Enhanced Linux (SELinux).

RHCE

RHCE Objectives - A complete list of the exam objectives, plus links to articles that cover them.

Routing IP Traffic on Linux - This article provides an introduction to routing IP traffic on Linux.

Use iptables to Implement Packet Filtering and Configure Network Address Translation (NAT) - This article describes how to use iptables to implement packet filtering and configure Network Address Translation (NAT).

Linux Kernel Run-Time Parameters - A description of how to check and set Linux kernel run-time parameters.

Configure Linux to Authenticate Using Kerberos - This article describes how to configure a Linux system to authenticate using Kerberos.

Build Simple Linux RPM Packages - Learn how to build simple RPM packages for Linux.

Linux iSCSI Targets and Initiators - Learn how to configure iSCSI targets and initiators on Linux.

sar - Produce and deliver reports on system utilization (processor, memory, disk, and network).

Shell Scripting - Use shell scripting to automate system maintenance tasks. (See also Bash Scripting Tutorial)

Linux Remote Logging - Configure remote logging between Linux servers.

Linux HTTP Server Configuration - Install and configure a HTTP server on Linux.

Linux DNS Configuration - A very brief introduction to DNS (BIND) configuration on Linux.

Linux FTP Server Configuration - Configure FTP servers on Linux.

Linux NFS Configuration - An introduction to Linux NFS configuration.

Linux Samba Configuration - An introduction to Linux Samba configuration.

Linux Mail Transfer Agent (MTA) Configuration Using Postfix - Configure a Mail Transfer Agent (MTA) on Linux using Postfix.

User Equivalence (Key-Based Authentication) Configuration on Linux - This article describes two methods for configuring user equivalence (key-based authentication) on Linux.

Linux NTP Configuration - Configure NTP servers and clients on Linux.

Docker/Container Articles

You can find my Dockerfiles on GitHub here.

Docker : An Oracle DBA's Guide to Docker - This article gives a basic introduction to some Docker concepts, focusing on those areas that are likely to interest Oracle DBAs.

Docker : Install Docker on Oracle Linux 7 (OL7) - This article demonstrates how to install Docker on Oracle Linux 7 (OL7) using a BTRFS file system.

Docker : Install Docker on Oracle Linux 8 (OL8) - This article demonstrates how to install Docker on Oracle Linux 8 (OL8).

Docker : Host File System Permissions for Container Persistent Host Volumes - How do you make sure a non-root user has access to the host volumes accessed by a container? Here's one method.

Docker : Quick Example with MySQL - This article provides a simple example of using existing Docker images to create a new Docker container. In this case it is a MySQL image, but the process is similar for other images.

Docker : Writing Your First Dockerfile - This article covers some of the basics of writing and using a Dockerfile with worked examples.

Docker : Dockerfile Tips - Build in Stages - When you are learning to write Dockerfiles, or developing a complex new build, you may find it easier to take a staged approach to the build process.

Docker : Oracle Database on Docker - This article describes a simple build for running an Oracle database on Docker.

Docker : Upgrade an Oracle Database on Docker - This article discusses the issues related to upgrading an Oracle Database running on a Docker container.

Docker : Oracle REST Data Services (ORDS) on Docker - This article describes a simple build for running Oracle REST Data Services (ORDS) on Docker.

Docker : Clean Up Unwanted Containers, Images, Volumes and Networks - It's easy for Docker to consume large amounts of space holding objects you are no longer using. This article shows how to identify and clean up unused containers, images, volumes and networks.

Docker : Docker Compose - Defining Multi-Container Applications - This article describes how to use Docker Compose to create multi-container applications.

Docker : Docker Swarm - Defining Clustered Multi-Container Applications - This article describes how to use Docker Swarm to create clustered multi-container applications.

Docker : Portainer - A Web-Based Management Interface for Docker - This articles explains how Portainer can be used to manage a local Docker environment.

Docker : Quick Tips - This article lists some quick tips that will help when learning Docker.

Docker and Oracle Databases : Finding the Sweet Spot - A blog post discussing the issues related to running Oracle databases in Docker.

AWX Installation on Oracle Linux 7 (OL7) Using the Docker-Compose Method - This article describes how to install AWX, the upstream project for Ansible Tower, on Oracle Linux 7 (OL7) using the Docker-Compose method.

Install Docker On Oracle Linux 7.5

Docker : Using a Local Docker Registry - This article demonstrates how to use a local Docker registry based on the Docker 'registry' image.

Kata Containers : Running Containers Inside Lightweight Virtual Machines on Oracle Linux 7 (OL7) - This article describes how to configure Kata Containers on Oracle Linux 7 (OL7), allowing you to run containers inside lightweight virtual machines (VMs).

Podman : Install Podman on Oracle Linux 8 (OL8) - We can think of Podman as a replacement for Docker, with an almost identical syntax. This article demonstrates how to install Podman on Oracle Linux 8 (OL8).

Podman : A Basic Example of Using Podman With Dockerfiles (Oracle Database and ORDS) on Oracle Linux 8 (OL8) - This articles shows how to use Podman with existing Dockerfiles as a replacement for Docker.

Podman : Generate and Play Kubernetes YAML Files - Podman can generate Kubernetes YAML files from existing pod definitions, and use the generated YAML files to fire up new pods.

Convert CentOS 8 to Oracle Linux 8 (OL8) - This article demonstrates how to convert a CentOS 8 installation to Oracle Linux 8 (OL8).

8i 9i 10g 11g 12c 13c 18c 19c 21c Misc PL/SQL SQL RAC WebLogic Linux

Home » Articles » Linux » Here

This article demonstrates how to install Docker on Oracle Linux 8 (OL8). RHEL8, and therefore OL8, have switched their focus from Docker and on to Podman (here) for containers, so this installation uses the Docker CE installation from the Docker repository.

Related articles.

Assumptions

This article makes the following assumptions.

  • You have a server (physical or virtual) with Oracle Linux 8 (OL8) installed. This is described here.
  • You have a separate partition to hold the images and containers. In this article we have a separate virtual disk.

Install Docker

Enable all the required repositories. To do this you are going to need the yum-utils package.

Install Docker.

Configure Disk (Optional)

By default the containers are created under the '/var/lib/docker', so you really need to house this on a separate disk or in a separate partition.

I have a second LUN with a device named '/dev/sdb'. I could build the file system on this disk directly, but I prefer to partition the disks with a single partition using fdisk..

Finish Docker Setup

Enable and start the Docker service.

You can get information about docker using the following commands.

You are now ready to start using Docker!

Docker Commands as Non-Root User

Docker commands run as the 'root' user. You have three choices when if comes to running docker commands.

  • Run the docker commands from the root user.
  • Allow another user to perform 'sudo' on the docker command, so all commands are run using 'sudo docker ...'.
  • Create a group called docker and assign that to the user you want to run docker commands from. The documentation says, 'Warning: The docker group grants privileges equivalent to the root user', so we should avoid this.

In this case we want to run the docker commands from a user called 'docker_user', so we add an entry in the '/etc/sudoers' file and use an alias in the user's '.bash_profile' file so we don't have to keep typing the 'sudo' command.

For more information see:

Install Docker Ce On Oracle Linux 6

Hope this helps. Regards Tim...