Skip to content

Commit

Permalink
Merge pull request #2 from grycap/gmolto-patch-0
Browse files Browse the repository at this point in the history
Minor documentation improvements
  • Loading branch information
dealfonso authored Dec 6, 2017
2 parents 60cd07b + 7414920 commit 25baa0f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The purpose of **minicon** is better understood with the use cases explained in

Reducing the footprint of one container is of special interest, to redistribute the container images.

It is of special interest in cases such as [SCAR](https://github.com/grycap/scar), that try to execute docker containers in AWS Lambda. In that case, the use cases are limited by the size of the container (the filesystem is limited to 512 Mb., and SCAR needs to push the image to AWS Lambda and then uncompress it; so the maximum size for the container is even more restricted).
It is of special interest in cases such as [SCAR](https://github.com/grycap/scar), that executes containers out of Docker images in AWS Lambda. In that case, the use cases are limited by the size of the container (the ephemeral storage space is limited to 512 Mb., and SCAR needs to pull the image from Docker Hub into the ephemeral storage and then uncompress it; so the maximum size for the container is even more restricted).

But there are also security reasons to minimize the unneeded application or environment available in one container image. In the case that the application fails, not having other applications reduces the impact of an intrusion (e.g. if the container does not need a compiler, why should it be there? maybe it would enable to compile a rootkit).

Expand All @@ -37,7 +37,7 @@ $ mv minicon /opt

### Dependencies

**minicon** depends on the commands _ldd_, _file_, _strace_ and _tar_. Soy you need to install the proper packages in your system.
**minicon** depends on the commands _ldd_, _file_, _strace_ and _tar_. So, you need to install the proper packages in your system.

**Ubuntu**

Expand All @@ -61,7 +61,7 @@ $ ./minicon <option> <executables to analyze, files or folders to include>

Some options are:
- **--rootfs | -r**: Create the filesystem in a specific folder.
- **--tar-file | -t**: Generate a tar file that contains the resulting filesystem. This is ideal to import it into docker using the command ```docker import tarfile.tar containerimage```. If not specified the _--rootfs_ parameter, **minicon** will use a temporary folder.
- **--tar-file | -t**: Generate a tar file that contains the resulting filesystem. This is ideal to import it into Docker using the command ```docker import tarfile.tar containerimage```. If not specified the _--rootfs_ parameter, **minicon** will use a temporary folder.
- **--ldconfig | -l**: Generate a _/etc/ldconfig.so_ file, adjusted to the new filesystem. It is suggested to always use this flag, to set the proper path to the libraries included in the new filesystem.
- **--plugin**: Activates some plugins and sets the options for them (see the [Plug-ins](#plug-ins) section).
- **--plugin-all**: Activates all the available plugins, using their default options (see the [Plug-ins](#plug-ins) sub-section).
Expand Down Expand Up @@ -410,7 +410,7 @@ We are using **minicon** to strip out any other things but the files that we nee
~/minicon$ docker run --rm -p 3000 -it -v $PWD:/tmp/minicon -w /tmp/minicon miniapp bash
```
And now run **minicon** to get only de files needed (take into account that now we need the interpreter (node) and the app folder (i.e. /usr/src/app)):
And now run **minicon** to get only the files needed (take into account that now we need the interpreter (node) and the app folder (i.e. /usr/src/app)):
```
root@2ed82c5454a9:/tmp/minicon# ./minicon -l -t miniapp.tar node /usr/src/app
[WARNING] 2017.11.29-18:15:18 disabling strace plugin because strace command is not available
Expand Down Expand Up @@ -441,7 +441,7 @@ In this case we have reduced the size of the container from 691MB to 45.4MB.
### Use case: FFMPEG
**TL;DR:** The size of a common _Ubuntu+FFMPEG_ image is about 387Mb., but if you apply **minicon** on that image, you will get a working _ffmpeg_ container whose size is only about 119Mb.

Imagine that you want to run the latest version of the app _ffmpeg_ to convert your video files. The usual way to proceed will consist of
Imagine that you want to run the latest version of the app _ffmpeg_ to convert your video files. The usual way to proceed will consist of:

1. Creating a Docker file with a content like the next one:

Expand All @@ -462,7 +462,7 @@ $ docker build . -t ubuntu:ffmpeg
$ docker run --rm -it -v /myvideos:/tmp/myvideos ubuntu:ffmpeg ffmpeg /tmp/myvideos ...
```

This usual procedure is ok, but if you take a look at the size of the image, you will find something like the next:
This usual procedure is ok, but if you take a look at the size of the image, you will find something as follows:

```bash
$ docker images
Expand Down

0 comments on commit 25baa0f

Please sign in to comment.