|
1 |
| -# docker-fc2-live-dl |
| 1 | +# Python |
2 | 2 |
|
3 |
| -[](https://www.codefactor.io/repository/github/jim60105/docker-fc2-live-dl) [](https://github.com/jim60105/docker-fc2-live-dl/actions/workflows/scan.yml) |
4 |
| - |
5 |
| -This is the docker image for [HoloArchivists/fc2-live-dl: Tool to download FC2 live streams](https://github.com/HoloArchivists/fc2-live-dl) from the community. |
6 |
| - |
7 |
| -Get the Dockerfile at [GitHub](https://github.com/jim60105/docker-fc2-live-dl), or pull the image from [ghcr.io](https://ghcr.io/jim60105/fc2-live-dl) or [quay.io](https://quay.io/repository/jim60105/fc2-live-dl?tab=tags). |
8 |
| - |
9 |
| -## Usage Command |
10 |
| - |
11 |
| -Mount the current directory as `/recordings` and run fc2-live-dl with additional input arguments. |
12 |
| -The downloaded files will be saved to where you run the command. |
13 |
| - |
14 |
| -```bash |
15 |
| -docker run -it -v ".:/recordings" ghcr.io/jim60105/fc2-live-dl [options] [fc2 url] |
16 |
| -``` |
17 |
| - |
18 |
| -The `[options]`, `[fc2 url]` placeholder should be replaced with the options and arguments for fc2-live-dl. Check the [fc2-live-dl README](https://github.com/HoloArchivists/fc2-live-dl?tab=readme-ov-file#usage) for more information. |
19 |
| - |
20 |
| -You can find all available tags at [ghcr.io](https://github.com/jim60105/docker-fc2-live-dl/pkgs/container/fc2-live-dl/versions?filters%5Bversion_type%5D=tagged) or [quay.io](https://quay.io/repository/jim60105/fc2-live-dl?tab=tags). |
21 |
| - |
22 |
| -## Usage Command for autofc2 |
23 |
| - |
24 |
| -When using autofc2, it is recommended to use the provided [docker-compose.yml](docker-compose.yml) file. |
25 |
| - |
26 |
| -Put the [autofc2.json](autofc2.json) file in the same directory as the [docker-compose.yml](docker-compose.yml) file, and execute the following command: |
27 |
| - |
28 |
| -```bash |
29 |
| -docker-compose up -d |
30 |
| -``` |
31 |
| - |
32 |
| -Please check the [HoloArchivists/fc2-live-dl README](https://github.com/HoloArchivists/fc2-live-dl/tree/main?tab=readme-ov-file#autofc2) for more information about the json file. |
33 |
| - |
34 |
| -> [!NOTE] |
35 |
| -> Please be aware that with our docker image, you need to **omit the `--config` parameter** and **use a relative path in outtmpl**. |
36 |
| -
|
37 |
| -## Available tags |
38 |
| - |
39 |
| -This repository contains three Dockerfiles for building Docker images based on different base images: |
| 3 | +## Good base images for Python |
40 | 4 |
|
41 | 5 | | Dockerfile | Base Image |
|
42 | 6 | | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
43 |
| -| [alpine.Dockerfile](alpine.Dockerfile) | [Python official image 3.11-alpine](https://hub.docker.com/_/python/) | |
| 7 | +| [alpine.Dockerfile](alpine.Dockerfile) | [Python official image](https://hub.docker.com/_/python/) | |
44 | 8 | | [ubi.Dockerfile](ubi.Dockerfile) | [Red Hat Universal Base Image 9 Minimal](https://catalog.redhat.com/software/containers/ubi9/ubi-minimal/615bd9b4075b022acc111bf5) |
|
45 |
| -| [distroless.Dockerfile](distroless.Dockerfile) | [Google Distroless python3-debian12](https://github.com/GoogleContainerTools/distroless) | |
46 |
| - |
47 |
| -And, built with the following code version of fc2-live-dl: main branch, v2.2.0, v2.1.3. |
48 |
| - |
49 |
| -| Code Version | Alpine | UBI | Distroless | |
50 |
| -| --------------------------------------------------------------------------- | ------------------------- | ------------ | ------------------- | |
51 |
| -| [main branch](https://github.com/HoloArchivists/fc2-live-dl) | `alpine`, `latest` | `ubi` | `distroless` | |
52 |
| -| [v2.2.0](https://github.com/HoloArchivists/fc2-live-dl/releases/tag/v2.2.0) | `v2.2.0`, `v2.2.0-alpine` | `v2.2.0-ubi` | `v2.2.0-distroless` | |
53 |
| -| [v2.1.3](https://github.com/HoloArchivists/fc2-live-dl/releases/tag/v2.1.3) | `v2.1.3`, `v2.1.3-alpine` | `v2.1.3-ubi` | `v2.1.3-distroless` | |
54 |
| - |
55 |
| -> [!TIP] |
56 |
| -> I've notice that that both the UBI version and the Distroless version offer no advantages over the Alpine version. So _**please use the Alpine version**_ unless you have specific reasons not to. All of these base images are great, some of them were simply not that suitable for our project. |
57 |
| -
|
58 |
| -### Build Command |
59 |
| - |
60 |
| -> [!IMPORTANT] |
61 |
| -> Clone the Git repository recursively to include submodules: |
62 |
| -> `git clone --recursive https://github.com/jim60105/docker-fc2-live-dl.git` |
63 |
| -
|
64 |
| -> [!NOTE] |
65 |
| -> If you are using an earlier version of the docker client, it is necessary to [enable the BuildKit mode](https://docs.docker.com/build/buildkit/#getting-started) when building the image. This is because I used the `COPY --link` feature which enhances the build performance and was introduced in Buildx v0.8. |
66 |
| -> With the Docker Engine 23.0 and Docker Desktop 4.19, Buildx has become the default build client. So you won't have to worry about this when using the latest version. |
67 |
| -
|
68 |
| -For example, if you want to build the alpine image: |
69 |
| - |
70 |
| -```bash |
71 |
| -docker build -f alpine.Dockerfile -t fc2-live-dl:alpine . |
72 |
| -``` |
73 |
| - |
74 |
| -## LICENSE |
75 |
| - |
76 |
| -> [!NOTE] |
77 |
| -> The main program, [HoloArchivists/fc2-live-dl](https://github.com/HoloArchivists/fc2-live-dl), is distributed under [MIT](https://github.com/HoloArchivists/fc2-live-dl/blob/main/LICENSE). |
78 |
| -> Please consult their repository for access to the source code and licenses. |
79 |
| -> The following is the license for the Dockerfiles and CI workflows in this repository. |
80 |
| -
|
81 |
| -> [!CAUTION] |
82 |
| -> A GPLv3 licensed Dockerfile means that you _**MUST**_ **distribute the source code with the same license**, if you |
83 |
| -> |
84 |
| -> - Re-distribute the image. (You can simply point to this GitHub repository if you doesn't made any code changes.) |
85 |
| -> - Distribute a image that uses code from this repository. |
86 |
| -> - Or **distribute a image based on this image**. (`FROM ghcr.io/jim60105/fc2-live-dl` in your Dockerfile) |
87 |
| -> |
88 |
| -> "Distribute" means to make the image available for other people to download, usually by pushing it to a public registry. If you are solely using it for your personal purposes, this has no impact on you. |
89 |
| -> |
90 |
| -> Please consult the [LICENSE](LICENSE) for more details. |
91 |
| -
|
92 |
| -<img src="https://github.com/jim60105/docker-fc2-live-dl/assets/16995691/102ae35d-cd95-4b38-8dbd-e1bfe6a1696f" alt="open graph" width="300" /> |
93 |
| - |
94 |
| -[GNU GENERAL PUBLIC LICENSE Version 3](LICENSE) |
95 |
| - |
96 |
| -This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. |
97 |
| - |
98 |
| -This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
99 |
| - |
100 |
| -You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. |
101 |
| - |
102 |
| -## 💭 |
103 |
| - |
104 |
| -The main reason I chose not to contribute my work back to the original repository is because I wanted to use the GPL license. I am a advocate for open source and have a great enthusiasm for the GPL license. However, it is important to acknowledge that the GPL license has more restrictions compared to the MIT license, and individuals have valid reasons for not choosing it. I fully respect their decision. Since it is not recommended to have multiple licenses in the same repository, I will distribute my work separately. |
105 |
| - |
106 |
| -Now, you may be wondering why you should choose my image instead of the original one. |
| 9 | +| [distroless.Dockerfile](distroless.Dockerfile) | [distroless-python](https://github.com/alexdmoss/distroless-python) | |
107 | 10 |
|
108 |
| -I have specifically created these images for fun... oops, focusing on security. I have dedicated years to play with containers. As a result, I have developed certain techniques that allow me to build more robust containers. To assess the difference, you can use tools like [Snyk](https://snyk.io/), [Trivy](https://github.com/aquasecurity/trivy), or even [Docker Scout](https://www.docker.com/products/docker-scout/) to scan the image. While I don't claim that my image is the MOST secure, I am confident that it is MORE security. |
| 11 | +## Good articles |
109 | 12 |
|
110 |
| -I do not intend to criticize anyone who create "Oh, it works" containers. Developing this skill requires learning, and I simply enjoy these toys more than others. I hope you can finds their values. |
| 13 | +- [Creating the Perfect Python Dockerfile | by Luis Sena | Medium](https://luis-sena.medium.com/creating-the-perfect-python-dockerfile-51bdec41f1c8) |
| 14 | +- [Multi-stage builds #2: Python specifics](https://pythonspeed.com/articles/multi-stage-docker-python/) |
| 15 | +- [To Virtualenv or not to Virtualenv for Docker? This is the question. | by Jarek Potiuk | Medium](https://potiuk.com/to-virtualenv-or-not-to-virtualenv-for-docker-this-is-the-question-6f980d753b46) |
0 commit comments