• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to create a Data Container for multiple Docker images on Fedora 34

  • 00:40 cat /etc/os-release
  • 01:04 docker create -v /folder --name datacontainer busybox
  • 01:51 touch test
  • 02:04 docker cp test datacontainer:/folder
  • 02:27 docker images
  • 02:57 docker run --volumes-from datacontainer ubuntu ls /folder
  • 04:01 docker run --volumes-from datacontainer centos ls /folder
{{postValue.id}}

To Create A Data Container for multiple Docker images on Fedora 34

Introduction:

Docker is a group of platforms as service products that enable software to be delivered in containers via OS-level virtualization. BusyBox combines several Unix utilities into a single executable file.

Installation procedure:

Step 1: Check the OS version by using the below command

[root@linuxhelp ~]# cat /etc/os-release
NAME=Fedora
VERSION="34 (Workstation Edition)"
ID=fedora
VERSION_ID=34
VERSION_CODENAME=""
PLATFORM_ID="platform:f34"
PRETTY_NAME="Fedora 34 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:34"
HOME_URL="https://fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=34
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=34
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Workstation Edition"
VARIANT_ID=workstation

Step 2: Create a busybox image with a directory named “folder” by using the below command

 [root@linuxhelp ~]# docker create -v /folder --name datacontainer busybox
Unable to find image 'busybox:latest' locally
latest: Pulling from library/busybox
009932687766: Pull complete 
Digest: sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb
Status: Downloaded newer image for busybox:latest
b9e0c1f4bd95ac3a9b7c17d0718e07b0e48d7a26a7f753a1bda1b5645765c9a6

Step 3: Create a file named “test” by using the below command

[root@linuxhelp ~]# touch test

Step 4: Copy the created file to the Container named “datacontainer” by using the below command

[root@linuxhelp ~]# docker cp test datacontainer:/folder

Step 5: List the images by using the below command

 [root@linuxhelp ~]# docker images
REPOSITORY    TAG       IMAGE ID       CREATED        SIZE
busybox       latest    ec3f0931a6e6   6 days ago     1.24MB
hello-world   latest    feb5d9fea6a5   4 months ago   13.3kB

Step 6: Mount the datacontainer as volume for the Centos images by using the below command

 [root@linuxhelp ~]# docker run --volumes-from datacontainer centos ls /folder
Unable to find image 'centos:latest' locally
latest: Pulling from library/centos
a1d0c7532777: Pull complete 
Digest: sha256:a27fd8080b517143cbbbab9dfb7c8571c40d67d534bbdee55bd6c473f432b177
Status: Downloaded newer image for centos:latest
test

Step 7: Mount the datacontainer as volume for the Ubuntu images by using the below command

 [root@linuxhelp ~]# docker run --volumes-from datacontainer ubuntu ls /folder
Unable to find image 'ubuntu:latest' locally
latest: Pulling from library/ubuntu
08c01a0ec47e: Pull complete 
Digest: sha256:669e010b58baf5beb2836b253c1fd5768333f0d1dbcb834f7c07a4dc93f474be
Status: Downloaded newer image for ubuntu:latest
Test

With this the process of Creating a Data Container for multiple Docker images on Fedora 34 have been completed.

Tags:
michael
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

How to get Bash of the Docker container?

A

To get Bash of the Docker container by using :docker run -it /bin/bash" command

Q

What is Busy Box?

A

BusyBox is a software suite that provides several Unix utilities in a single execution.

Q

For what Busy Box is used?

A

Busybox allows programs to perform actions on your phone using Linux (copied from Unix) commands.

Q

Is Busy Box a software or Operating System?

A

A software that is located on a higher layer than the operating system and brings together programs in a multi-call executable, offering, through a list of commands, the execution of various tasks.

Q

How to Mount the data container as volume for the Container images?

A

Mount the data container as volume for the Container images by "docker run --volumes-from datacontainer "

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Luke ?
workbench for debian

I am using workbench in CentOS whereas now I need to use Debian Operating system so could you please help to install and use in Debian?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.