|
|
1 an în urmă | |
|---|---|---|
| .. | ||
| Dockerfile | 1 an în urmă | |
| readme.md | 1 an în urmă | |
The Compact Box Docker image is designed to simplify file operations and examination of volume contents. This image is built on top of the official Alpine Linux image and includes a set of essential tools for file management.
To use the Compact Box Docker image, follow these steps:
First, pull the Compact Box Docker image from the registry:
docker pull compact-box
Run a new container from the image, mounting a volume at /mnt:
docker run -it --rm --name compact -v nc4_files:/mnt compact-box
Replace nc4_files with the name of your volume.
You will be logged into the container as the root user. You can now perform file operations and examine the contents of the volume at /mnt.
The Compact Box Docker image includes the following tools:
bash: The Bourne-Again SHellwget: A command-line utility for downloading files from the webrsync: A command-line utility for synchronizing files and directoriesmc: The Midnight Commander file managersudo: A command-line utility for running commands with superuser privilegesvim: A text editorzip: A command-line utility for compressing and decompressing filescurl: A command-line utility for transferring data to and from a web serverThe image configures the /mnt directory with the following permissions:
chmod 755 /mnt
This allows the container to read and write files in the volume.
The default command for the container is bash, which logs you into the container as the root user.
docker run -it --rm --name compact -v nc4_files:/mnt compact-boxdocker run -it --rm --name compact -v nc4_files:/mnt compact-box rsync -av /mnt/ /host/path/docker run -it --rm --name compact -v nc4_files:/mnt compact-box wget -O /mnt/file.txt http://example.com/file.txt