-
Notifications
You must be signed in to change notification settings - Fork 62
Added Docker CI/CD #337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Added Docker CI/CD #337
Conversation
fix(core): fixed safe directory error chore(core): optimized Dockerfile
I think I reverted the readme commit, so I pushed it again. |
Note that I have not yet check changes line by line, but just got the big picture, I am waiting you to answer #338#issuecomment-3221623630, to continue investigating your proposal. |
This code is currently docker versioning with the commit hash value (short hash) So right now, the repo is working the same way |
Sorry for being picky. Please consider my comments, then I will verify experimentally that |
I'll update the code after comments are answered. |
I treated your answers, let me know if I forgot one. |
Are there any expected developments? |
I will consider your comment files#r2306463965. |
The .git folder will no longer appear during build. I also updated the version control |
Sorry I was quite busy these last days, let me check what I wanted to provide feedback for. |
Can you rebase your branch? Well this should be unnecessary as I plan to Merge pull request > Squash and merge. |
Personal note: The Stack Overflow answer 5038977 helps figuring out the differences of this pull request.
Output:
|
docker-compose up | ||
# start in the background | ||
docker-compose up -d | ||
docker run -p 8080:80 benjaminloison/youtube-operational-api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the person just has the repository cloned (and appropriate dependencies and no Internet access) or does not want to use closed-source DockerHub?
docker run -p 8080:80 .
Output:
docker: invalid reference format.
See 'docker run --help'.
docker-compose up
Output:
WARNING: The EXPOSED_HTTP_PORT variable is not set. Defaulting to a blank string.
ERROR: The Compose file './docker-compose.yml' is invalid because:
services.api.ports contains an invalid type, it should be a number, or an object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, they can use the docker build
command. They should be aware of this if a fork occurs. Because they cannot download and call their own code from Docker Hub
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personal note:
docker build
Output:
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/buildx/
"docker build" requires exactly 1 argument.
See 'docker build --help'.
Usage: docker build [OPTIONS] PATH | URL | -
Build an image from a Dockerfile
docker build .
Output:
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/buildx/
Sending build context to Docker daemon 207.9kB
Step 1/14 : FROM php:apache AS builder
---> 40286d9b5483
Step 2/14 : RUN apt-get update && apt-get install -y git protobuf-compiler
---> Running in 8ebe1ae617ba
Hit:1 http://deb.debian.org/debian trixie InRelease
Get:2 http://deb.debian.org/debian trixie-updates InRelease [47.1 kB]
Get:3 http://deb.debian.org/debian-security trixie-security InRelease [43.4 kB]
Get:4 http://deb.debian.org/debian trixie/main arm64 Packages [9604 kB]
Get:5 http://deb.debian.org/debian trixie-updates/main arm64 Packages [2432 B]
Get:6 http://deb.debian.org/debian-security trixie-security/main arm64 Packages [33.6 kB]
Fetched 9730 kB in 1s (9269 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
git-man less libcbor0.10 libcurl3t64-gnutls libedit2 liberror-perl
libfido2-1 libngtcp2-16 libngtcp2-crypto-gnutls8 libprotobuf-dev
libprotobuf-lite32t64 libprotobuf32t64 libprotoc32t64 libx11-6 libx11-data
libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 openssh-client xauth zlib1g-dev
Suggested packages:
gettext-base git-doc git-email git-gui gitk gitweb git-cvs git-mediawiki
git-svn keychain libpam-ssh monkeysphere ssh-askpass protobuf-mode-el
The following NEW packages will be installed:
git git-man less libcbor0.10 libcurl3t64-gnutls libedit2 liberror-perl
libfido2-1 libngtcp2-16 libngtcp2-crypto-gnutls8 libprotobuf-dev
libprotobuf-lite32t64 libprotobuf32t64 libprotoc32t64 libx11-6 libx11-data
libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 openssh-client protobuf-compiler
xauth zlib1g-dev
0 upgraded, 25 newly installed, 0 to remove and 1 not upgraded.
Need to get 18.3 MB of archives.
After this operation, 87.4 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian trixie/main arm64 less arm64 668-1 [156 kB]
Get:2 http://deb.debian.org/debian trixie/main arm64 libedit2 arm64 3.1-20250104-1 [89.3 kB]
Get:3 http://deb.debian.org/debian trixie/main arm64 libcbor0.10 arm64 0.10.2-2 [27.4 kB]
Get:4 http://deb.debian.org/debian trixie/main arm64 libfido2-1 arm64 1.15.0-1+b1 [74.3 kB]
Get:5 http://deb.debian.org/debian trixie/main arm64 openssh-client arm64 1:10.0p1-7 [925 kB]
Get:6 http://deb.debian.org/debian trixie/main arm64 libngtcp2-16 arm64 1.11.0-1 [121 kB]
Get:7 http://deb.debian.org/debian trixie/main arm64 libngtcp2-crypto-gnutls8 arm64 1.11.0-1 [28.2 kB]
Get:8 http://deb.debian.org/debian trixie/main arm64 libcurl3t64-gnutls arm64 8.14.1-2 [353 kB]
Get:9 http://deb.debian.org/debian trixie/main arm64 liberror-perl all 0.17030-1 [26.9 kB]
Get:10 http://deb.debian.org/debian trixie/main arm64 git-man all 1:2.47.2-0.2 [2205 kB]
Get:11 http://deb.debian.org/debian trixie/main arm64 git arm64 1:2.47.2-0.2 [8724 kB]
Get:12 http://deb.debian.org/debian trixie/main arm64 zlib1g-dev arm64 1:1.3.dfsg+really1.3.1-1+b1 [917 kB]
Get:13 http://deb.debian.org/debian trixie/main arm64 libprotobuf32t64 arm64 3.21.12-11 [858 kB]
Get:14 http://deb.debian.org/debian trixie/main arm64 libprotobuf-lite32t64 arm64 3.21.12-11 [250 kB]
Get:15 http://deb.debian.org/debian trixie/main arm64 libprotobuf-dev arm64 3.21.12-11 [1261 kB]
Get:16 http://deb.debian.org/debian trixie/main arm64 libprotoc32t64 arm64 3.21.12-11 [790 kB]
Get:17 http://deb.debian.org/debian trixie/main arm64 libxau6 arm64 1:1.0.11-1 [20.6 kB]
Get:18 http://deb.debian.org/debian trixie/main arm64 libxdmcp6 arm64 1:1.1.5-1 [27.8 kB]
Get:19 http://deb.debian.org/debian trixie/main arm64 libxcb1 arm64 1.17.0-2+b1 [143 kB]
Get:20 http://deb.debian.org/debian trixie/main arm64 libx11-data all 2:1.8.12-1 [343 kB]
Get:21 http://deb.debian.org/debian trixie/main arm64 libx11-6 arm64 2:1.8.12-1 [795 kB]
Get:22 http://deb.debian.org/debian trixie/main arm64 libxext6 arm64 2:1.3.4-1+b3 [49.2 kB]
Get:23 http://deb.debian.org/debian trixie/main arm64 libxmuu1 arm64 2:1.1.3-3+b4 [22.0 kB]
Get:24 http://deb.debian.org/debian trixie/main arm64 protobuf-compiler arm64 3.21.12-11 [84.7 kB]
Get:25 http://deb.debian.org/debian trixie/main arm64 xauth arm64 1:1.1.2-1.1 [35.4 kB]
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
debconf: unable to initialize frontend: Teletype
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Noninteractive
Fetched 18.3 MB in 0s (83.9 MB/s)
Selecting previously unselected package less.
(Reading database ... 15697 files and directories currently installed.)
Preparing to unpack .../00-less_668-1_arm64.deb ...
Unpacking less (668-1) ...
Selecting previously unselected package libedit2:arm64.
Preparing to unpack .../01-libedit2_3.1-20250104-1_arm64.deb ...
Unpacking libedit2:arm64 (3.1-20250104-1) ...
Selecting previously unselected package libcbor0.10:arm64.
Preparing to unpack .../02-libcbor0.10_0.10.2-2_arm64.deb ...
Unpacking libcbor0.10:arm64 (0.10.2-2) ...
Selecting previously unselected package libfido2-1:arm64.
Preparing to unpack .../03-libfido2-1_1.15.0-1+b1_arm64.deb ...
Unpacking libfido2-1:arm64 (1.15.0-1+b1) ...
Selecting previously unselected package openssh-client.
Preparing to unpack .../04-openssh-client_1%3a10.0p1-7_arm64.deb ...
Unpacking openssh-client (1:10.0p1-7) ...
Selecting previously unselected package libngtcp2-16:arm64.
Preparing to unpack .../05-libngtcp2-16_1.11.0-1_arm64.deb ...
Unpacking libngtcp2-16:arm64 (1.11.0-1) ...
Selecting previously unselected package libngtcp2-crypto-gnutls8:arm64.
Preparing to unpack .../06-libngtcp2-crypto-gnutls8_1.11.0-1_arm64.deb ...
Unpacking libngtcp2-crypto-gnutls8:arm64 (1.11.0-1) ...
Selecting previously unselected package libcurl3t64-gnutls:arm64.
Preparing to unpack .../07-libcurl3t64-gnutls_8.14.1-2_arm64.deb ...
Unpacking libcurl3t64-gnutls:arm64 (8.14.1-2) ...
Selecting previously unselected package liberror-perl.
Preparing to unpack .../08-liberror-perl_0.17030-1_all.deb ...
Unpacking liberror-perl (0.17030-1) ...
Selecting previously unselected package git-man.
Preparing to unpack .../09-git-man_1%3a2.47.2-0.2_all.deb ...
Unpacking git-man (1:2.47.2-0.2) ...
Selecting previously unselected package git.
Preparing to unpack .../10-git_1%3a2.47.2-0.2_arm64.deb ...
Unpacking git (1:2.47.2-0.2) ...
Selecting previously unselected package zlib1g-dev:arm64.
Preparing to unpack .../11-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1+b1_arm64.deb ...
Unpacking zlib1g-dev:arm64 (1:1.3.dfsg+really1.3.1-1+b1) ...
Selecting previously unselected package libprotobuf32t64:arm64.
Preparing to unpack .../12-libprotobuf32t64_3.21.12-11_arm64.deb ...
Unpacking libprotobuf32t64:arm64 (3.21.12-11) ...
Selecting previously unselected package libprotobuf-lite32t64:arm64.
Preparing to unpack .../13-libprotobuf-lite32t64_3.21.12-11_arm64.deb ...
Unpacking libprotobuf-lite32t64:arm64 (3.21.12-11) ...
Selecting previously unselected package libprotobuf-dev:arm64.
Preparing to unpack .../14-libprotobuf-dev_3.21.12-11_arm64.deb ...
Unpacking libprotobuf-dev:arm64 (3.21.12-11) ...
Selecting previously unselected package libprotoc32t64:arm64.
Preparing to unpack .../15-libprotoc32t64_3.21.12-11_arm64.deb ...
Unpacking libprotoc32t64:arm64 (3.21.12-11) ...
Selecting previously unselected package libxau6:arm64.
Preparing to unpack .../16-libxau6_1%3a1.0.11-1_arm64.deb ...
Unpacking libxau6:arm64 (1:1.0.11-1) ...
Selecting previously unselected package libxdmcp6:arm64.
Preparing to unpack .../17-libxdmcp6_1%3a1.1.5-1_arm64.deb ...
Unpacking libxdmcp6:arm64 (1:1.1.5-1) ...
Selecting previously unselected package libxcb1:arm64.
Preparing to unpack .../18-libxcb1_1.17.0-2+b1_arm64.deb ...
Unpacking libxcb1:arm64 (1.17.0-2+b1) ...
Selecting previously unselected package libx11-data.
Preparing to unpack .../19-libx11-data_2%3a1.8.12-1_all.deb ...
Unpacking libx11-data (2:1.8.12-1) ...
Selecting previously unselected package libx11-6:arm64.
Preparing to unpack .../20-libx11-6_2%3a1.8.12-1_arm64.deb ...
Unpacking libx11-6:arm64 (2:1.8.12-1) ...
Selecting previously unselected package libxext6:arm64.
Preparing to unpack .../21-libxext6_2%3a1.3.4-1+b3_arm64.deb ...
Unpacking libxext6:arm64 (2:1.3.4-1+b3) ...
Selecting previously unselected package libxmuu1:arm64.
Preparing to unpack .../22-libxmuu1_2%3a1.1.3-3+b4_arm64.deb ...
Unpacking libxmuu1:arm64 (2:1.1.3-3+b4) ...
Selecting previously unselected package protobuf-compiler.
Preparing to unpack .../23-protobuf-compiler_3.21.12-11_arm64.deb ...
Unpacking protobuf-compiler (3.21.12-11) ...
Selecting previously unselected package xauth.
Preparing to unpack .../24-xauth_1%3a1.1.2-1.1_arm64.deb ...
Unpacking xauth (1:1.1.2-1.1) ...
Setting up libprotobuf-lite32t64:arm64 (3.21.12-11) ...
Setting up libprotobuf32t64:arm64 (3.21.12-11) ...
Setting up libxau6:arm64 (1:1.0.11-1) ...
Setting up libxdmcp6:arm64 (1:1.1.5-1) ...
Setting up libxcb1:arm64 (1.17.0-2+b1) ...
Setting up libcbor0.10:arm64 (0.10.2-2) ...
Setting up libedit2:arm64 (3.1-20250104-1) ...
Setting up less (668-1) ...
Setting up liberror-perl (0.17030-1) ...
Setting up libx11-data (2:1.8.12-1) ...
Setting up zlib1g-dev:arm64 (1:1.3.dfsg+really1.3.1-1+b1) ...
Setting up git-man (1:2.47.2-0.2) ...
Setting up libx11-6:arm64 (2:1.8.12-1) ...
Setting up libngtcp2-16:arm64 (1.11.0-1) ...
Setting up libprotoc32t64:arm64 (3.21.12-11) ...
Setting up libfido2-1:arm64 (1.15.0-1+b1) ...
Setting up libxmuu1:arm64 (2:1.1.3-3+b4) ...
Setting up libngtcp2-crypto-gnutls8:arm64 (1.11.0-1) ...
Setting up protobuf-compiler (3.21.12-11) ...
Setting up openssh-client (1:10.0p1-7) ...
Setting up libcurl3t64-gnutls:arm64 (8.14.1-2) ...
Setting up libxext6:arm64 (2:1.3.4-1+b3) ...
Setting up libprotobuf-dev:arm64 (3.21.12-11) ...
Setting up git (1:2.47.2-0.2) ...
Setting up xauth (1:1.1.2-1.1) ...
Processing triggers for libc-bin (2.41-12) ...
---> Removed intermediate container 8ebe1ae617ba
---> 0991269e51d0
Step 3/14 : COPY --from=composer/composer:latest-bin /composer /usr/bin/composer
---> 3e3ec5f662cd
Step 4/14 : COPY . /app
---> c13ae394d346
Step 5/14 : WORKDIR /app
---> Running in 6eefa9c055cc
---> Removed intermediate container 6eefa9c055cc
---> c626aa596bc5
Step 6/14 : RUN composer require google/protobuf && protoc --php_out=proto/php/ --proto_path=proto/prototypes/ $(find proto/prototypes/ -type f)
---> Running in 651d5a0397e9
./composer.json has been created
Running composer update google/protobuf
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
- Locking google/protobuf (v4.32.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
Failed to download google/protobuf from dist: The zip extension and unzip/7z commands are both missing, skipping.
Your command-line PHP is using multiple ini files. Run `php --ini` to show them.
Now trying to download from source
- Syncing google/protobuf (v4.32.0) into cache
- Installing google/protobuf (v4.32.0): Cloning 9a9a92ecbe from cache
1 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
No security vulnerability advisories found.
Using version ^4.32 for google/protobuf
---> Removed intermediate container 651d5a0397e9
---> d4d2a620ff6a
Step 7/14 : FROM php:apache
---> 40286d9b5483
Step 8/14 : RUN a2enmod rewrite
---> Using cache
---> 26eb627e716b
Step 9/14 : COPY --from=builder /app /var/www/html/
---> c5a728ffa962
Step 10/14 : RUN sed -ri -e 'N;N;N;s/(<Directory \/var\/www\/>\n)(.*\n)(.*)AllowOverride None/\1\2\3AllowOverride All/;p;d;' /etc/apache2/apache2.conf
---> Running in 5dd3fd75d562
---> Removed intermediate container 5dd3fd75d562
---> bfe83b820723
Step 11/14 : ARG VERSION
---> Running in ca4ac6248366
---> Removed intermediate container ca4ac6248366
---> c4c34f02fc0e
Step 12/14 : ENV VERSION=$VERSION
---> Running in 6e2f72514590
---> Removed intermediate container 6e2f72514590
---> da6b3ca6e6e3
Step 13/14 : EXPOSE 80
---> Running in 6da4ee9d634d
---> Removed intermediate container 6da4ee9d634d
---> e24739730cb7
Step 14/14 : ENTRYPOINT ["apachectl", "-D", "FOREGROUND"]
---> Running in 261d0ed981b3
---> Removed intermediate container 261d0ed981b3
---> 1d3364a27baa
Successfully built 1d3364a27baa
docker run
Output:
"docker run" requires at least 1 argument.
See 'docker run --help'.
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Create and run a new container from an image
docker run .
Output:
docker: invalid reference format.
See 'docker run --help'.
docker image ls
Output:
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> 1d3364a27baa About a minute ago 526MB
docker container ls
does not change.
docker run 1d3364a27baa
Output:
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
[Sat Aug 30 19:17:28.183610 2025] [mpm_prefork:notice] [pid 8:tid 8] AH00163: Apache/2.4.65 (Debian) PHP/8.4.12 configured -- resuming normal operations
[Sat Aug 30 19:17:28.183654 2025] [core:notice] [pid 8:tid 8] AH00094: Command line: '/usr/sbin/apache2 -D FOREGROUND'
docker run -p 8080:80 1d3364a27baa
Output:
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message
[Sat Aug 30 19:18:50.271540 2025] [mpm_prefork:notice] [pid 8:tid 8] AH00163: Apache/2.4.65 (Debian) PHP/8.4.12 configured -- resuming normal operations
[Sat Aug 30 19:18:50.271584 2025] [core:notice] [pid 8:tid 8] AH00094: Command line: '/usr/sbin/apache2 -D FOREGROUND'
works as wanted contrarily to previous command.
docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
time docker build .
Output:
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/buildx/
Sending build context to Docker daemon 207.9kB
Step 1/14 : FROM php:apache AS builder
apache: Pulling from library/php
9a6263cdeaa5: Pull complete
ef1ee6d029e6: Pull complete
a472e922e809: Pull complete
48fe053e93cb: Pull complete
fc43ae40cfaf: Pull complete
68c0c909ee69: Pull complete
a5af3640212f: Pull complete
d1daf55e39b8: Pull complete
0aa06473af9f: Pull complete
b009c6bfbc2e: Pull complete
d7b879e84d79: Pull complete
ce23f515033b: Pull complete
7b848ff217f1: Pull complete
a341f2f20c41: Pull complete
4f4fb700ef54: Pull complete
Digest: sha256:fc535e6bf80041c11d99380d2a5a3ff4ceaafac7efbd4f8d53c876ca4751c7c2
Status: Downloaded newer image for php:apache
---> 40286d9b5483
Step 2/14 : RUN apt-get update && apt-get install -y git protobuf-compiler
---> Running in 94bb8483e49b
Hit:1 http://deb.debian.org/debian trixie InRelease
Get:2 http://deb.debian.org/debian trixie-updates InRelease [47.1 kB]
Get:3 http://deb.debian.org/debian-security trixie-security InRelease [43.4 kB]
Get:4 http://deb.debian.org/debian trixie/main arm64 Packages [9604 kB]
Get:5 http://deb.debian.org/debian trixie-updates/main arm64 Packages [2432 B]
Get:6 http://deb.debian.org/debian-security trixie-security/main arm64 Packages [33.6 kB]
Fetched 9730 kB in 1s (9792 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
git-man less libcbor0.10 libcurl3t64-gnutls libedit2 liberror-perl
libfido2-1 libngtcp2-16 libngtcp2-crypto-gnutls8 libprotobuf-dev
libprotobuf-lite32t64 libprotobuf32t64 libprotoc32t64 libx11-6 libx11-data
libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 openssh-client xauth zlib1g-dev
Suggested packages:
gettext-base git-doc git-email git-gui gitk gitweb git-cvs git-mediawiki
git-svn keychain libpam-ssh monkeysphere ssh-askpass protobuf-mode-el
The following NEW packages will be installed:
git git-man less libcbor0.10 libcurl3t64-gnutls libedit2 liberror-perl
libfido2-1 libngtcp2-16 libngtcp2-crypto-gnutls8 libprotobuf-dev
libprotobuf-lite32t64 libprotobuf32t64 libprotoc32t64 libx11-6 libx11-data
libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 openssh-client protobuf-compiler
xauth zlib1g-dev
0 upgraded, 25 newly installed, 0 to remove and 1 not upgraded.
Need to get 18.3 MB of archives.
After this operation, 87.4 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian trixie/main arm64 less arm64 668-1 [156 kB]
Get:2 http://deb.debian.org/debian trixie/main arm64 libedit2 arm64 3.1-20250104-1 [89.3 kB]
Get:3 http://deb.debian.org/debian trixie/main arm64 libcbor0.10 arm64 0.10.2-2 [27.4 kB]
Get:4 http://deb.debian.org/debian trixie/main arm64 libfido2-1 arm64 1.15.0-1+b1 [74.3 kB]
Get:5 http://deb.debian.org/debian trixie/main arm64 openssh-client arm64 1:10.0p1-7 [925 kB]
Get:6 http://deb.debian.org/debian trixie/main arm64 libngtcp2-16 arm64 1.11.0-1 [121 kB]
Get:7 http://deb.debian.org/debian trixie/main arm64 libngtcp2-crypto-gnutls8 arm64 1.11.0-1 [28.2 kB]
Get:8 http://deb.debian.org/debian trixie/main arm64 libcurl3t64-gnutls arm64 8.14.1-2 [353 kB]
Get:9 http://deb.debian.org/debian trixie/main arm64 liberror-perl all 0.17030-1 [26.9 kB]
Get:10 http://deb.debian.org/debian trixie/main arm64 git-man all 1:2.47.2-0.2 [2205 kB]
Get:11 http://deb.debian.org/debian trixie/main arm64 git arm64 1:2.47.2-0.2 [8724 kB]
Get:12 http://deb.debian.org/debian trixie/main arm64 zlib1g-dev arm64 1:1.3.dfsg+really1.3.1-1+b1 [917 kB]
Get:13 http://deb.debian.org/debian trixie/main arm64 libprotobuf32t64 arm64 3.21.12-11 [858 kB]
Get:14 http://deb.debian.org/debian trixie/main arm64 libprotobuf-lite32t64 arm64 3.21.12-11 [250 kB]
Get:15 http://deb.debian.org/debian trixie/main arm64 libprotobuf-dev arm64 3.21.12-11 [1261 kB]
Get:16 http://deb.debian.org/debian trixie/main arm64 libprotoc32t64 arm64 3.21.12-11 [790 kB]
Get:17 http://deb.debian.org/debian trixie/main arm64 libxau6 arm64 1:1.0.11-1 [20.6 kB]
Get:18 http://deb.debian.org/debian trixie/main arm64 libxdmcp6 arm64 1:1.1.5-1 [27.8 kB]
Get:19 http://deb.debian.org/debian trixie/main arm64 libxcb1 arm64 1.17.0-2+b1 [143 kB]
Get:20 http://deb.debian.org/debian trixie/main arm64 libx11-data all 2:1.8.12-1 [343 kB]
Get:21 http://deb.debian.org/debian trixie/main arm64 libx11-6 arm64 2:1.8.12-1 [795 kB]
Get:22 http://deb.debian.org/debian trixie/main arm64 libxext6 arm64 2:1.3.4-1+b3 [49.2 kB]
Get:23 http://deb.debian.org/debian trixie/main arm64 libxmuu1 arm64 2:1.1.3-3+b4 [22.0 kB]
Get:24 http://deb.debian.org/debian trixie/main arm64 protobuf-compiler arm64 3.21.12-11 [84.7 kB]
Get:25 http://deb.debian.org/debian trixie/main arm64 xauth arm64 1:1.1.2-1.1 [35.4 kB]
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
debconf: unable to initialize frontend: Teletype
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Noninteractive
Fetched 18.3 MB in 0s (64.1 MB/s)
Selecting previously unselected package less.
(Reading database ... 15697 files and directories currently installed.)
Preparing to unpack .../00-less_668-1_arm64.deb ...
Unpacking less (668-1) ...
Selecting previously unselected package libedit2:arm64.
Preparing to unpack .../01-libedit2_3.1-20250104-1_arm64.deb ...
Unpacking libedit2:arm64 (3.1-20250104-1) ...
Selecting previously unselected package libcbor0.10:arm64.
Preparing to unpack .../02-libcbor0.10_0.10.2-2_arm64.deb ...
Unpacking libcbor0.10:arm64 (0.10.2-2) ...
Selecting previously unselected package libfido2-1:arm64.
Preparing to unpack .../03-libfido2-1_1.15.0-1+b1_arm64.deb ...
Unpacking libfido2-1:arm64 (1.15.0-1+b1) ...
Selecting previously unselected package openssh-client.
Preparing to unpack .../04-openssh-client_1%3a10.0p1-7_arm64.deb ...
Unpacking openssh-client (1:10.0p1-7) ...
Selecting previously unselected package libngtcp2-16:arm64.
Preparing to unpack .../05-libngtcp2-16_1.11.0-1_arm64.deb ...
Unpacking libngtcp2-16:arm64 (1.11.0-1) ...
Selecting previously unselected package libngtcp2-crypto-gnutls8:arm64.
Preparing to unpack .../06-libngtcp2-crypto-gnutls8_1.11.0-1_arm64.deb ...
Unpacking libngtcp2-crypto-gnutls8:arm64 (1.11.0-1) ...
Selecting previously unselected package libcurl3t64-gnutls:arm64.
Preparing to unpack .../07-libcurl3t64-gnutls_8.14.1-2_arm64.deb ...
Unpacking libcurl3t64-gnutls:arm64 (8.14.1-2) ...
Selecting previously unselected package liberror-perl.
Preparing to unpack .../08-liberror-perl_0.17030-1_all.deb ...
Unpacking liberror-perl (0.17030-1) ...
Selecting previously unselected package git-man.
Preparing to unpack .../09-git-man_1%3a2.47.2-0.2_all.deb ...
Unpacking git-man (1:2.47.2-0.2) ...
Selecting previously unselected package git.
Preparing to unpack .../10-git_1%3a2.47.2-0.2_arm64.deb ...
Unpacking git (1:2.47.2-0.2) ...
Selecting previously unselected package zlib1g-dev:arm64.
Preparing to unpack .../11-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1+b1_arm64.deb ...
Unpacking zlib1g-dev:arm64 (1:1.3.dfsg+really1.3.1-1+b1) ...
Selecting previously unselected package libprotobuf32t64:arm64.
Preparing to unpack .../12-libprotobuf32t64_3.21.12-11_arm64.deb ...
Unpacking libprotobuf32t64:arm64 (3.21.12-11) ...
Selecting previously unselected package libprotobuf-lite32t64:arm64.
Preparing to unpack .../13-libprotobuf-lite32t64_3.21.12-11_arm64.deb ...
Unpacking libprotobuf-lite32t64:arm64 (3.21.12-11) ...
Selecting previously unselected package libprotobuf-dev:arm64.
Preparing to unpack .../14-libprotobuf-dev_3.21.12-11_arm64.deb ...
Unpacking libprotobuf-dev:arm64 (3.21.12-11) ...
Selecting previously unselected package libprotoc32t64:arm64.
Preparing to unpack .../15-libprotoc32t64_3.21.12-11_arm64.deb ...
Unpacking libprotoc32t64:arm64 (3.21.12-11) ...
Selecting previously unselected package libxau6:arm64.
Preparing to unpack .../16-libxau6_1%3a1.0.11-1_arm64.deb ...
Unpacking libxau6:arm64 (1:1.0.11-1) ...
Selecting previously unselected package libxdmcp6:arm64.
Preparing to unpack .../17-libxdmcp6_1%3a1.1.5-1_arm64.deb ...
Unpacking libxdmcp6:arm64 (1:1.1.5-1) ...
Selecting previously unselected package libxcb1:arm64.
Preparing to unpack .../18-libxcb1_1.17.0-2+b1_arm64.deb ...
Unpacking libxcb1:arm64 (1.17.0-2+b1) ...
Selecting previously unselected package libx11-data.
Preparing to unpack .../19-libx11-data_2%3a1.8.12-1_all.deb ...
Unpacking libx11-data (2:1.8.12-1) ...
Selecting previously unselected package libx11-6:arm64.
Preparing to unpack .../20-libx11-6_2%3a1.8.12-1_arm64.deb ...
Unpacking libx11-6:arm64 (2:1.8.12-1) ...
Selecting previously unselected package libxext6:arm64.
Preparing to unpack .../21-libxext6_2%3a1.3.4-1+b3_arm64.deb ...
Unpacking libxext6:arm64 (2:1.3.4-1+b3) ...
Selecting previously unselected package libxmuu1:arm64.
Preparing to unpack .../22-libxmuu1_2%3a1.1.3-3+b4_arm64.deb ...
Unpacking libxmuu1:arm64 (2:1.1.3-3+b4) ...
Selecting previously unselected package protobuf-compiler.
Preparing to unpack .../23-protobuf-compiler_3.21.12-11_arm64.deb ...
Unpacking protobuf-compiler (3.21.12-11) ...
Selecting previously unselected package xauth.
Preparing to unpack .../24-xauth_1%3a1.1.2-1.1_arm64.deb ...
Unpacking xauth (1:1.1.2-1.1) ...
Setting up libprotobuf-lite32t64:arm64 (3.21.12-11) ...
Setting up libprotobuf32t64:arm64 (3.21.12-11) ...
Setting up libxau6:arm64 (1:1.0.11-1) ...
Setting up libxdmcp6:arm64 (1:1.1.5-1) ...
Setting up libxcb1:arm64 (1.17.0-2+b1) ...
Setting up libcbor0.10:arm64 (0.10.2-2) ...
Setting up libedit2:arm64 (3.1-20250104-1) ...
Setting up less (668-1) ...
Setting up liberror-perl (0.17030-1) ...
Setting up libx11-data (2:1.8.12-1) ...
Setting up zlib1g-dev:arm64 (1:1.3.dfsg+really1.3.1-1+b1) ...
Setting up git-man (1:2.47.2-0.2) ...
Setting up libx11-6:arm64 (2:1.8.12-1) ...
Setting up libngtcp2-16:arm64 (1.11.0-1) ...
Setting up libprotoc32t64:arm64 (3.21.12-11) ...
Setting up libfido2-1:arm64 (1.15.0-1+b1) ...
Setting up libxmuu1:arm64 (2:1.1.3-3+b4) ...
Setting up libngtcp2-crypto-gnutls8:arm64 (1.11.0-1) ...
Setting up protobuf-compiler (3.21.12-11) ...
Setting up openssh-client (1:10.0p1-7) ...
Setting up libcurl3t64-gnutls:arm64 (8.14.1-2) ...
Setting up libxext6:arm64 (2:1.3.4-1+b3) ...
Setting up libprotobuf-dev:arm64 (3.21.12-11) ...
Setting up git (1:2.47.2-0.2) ...
Setting up xauth (1:1.1.2-1.1) ...
Processing triggers for libc-bin (2.41-12) ...
---> Removed intermediate container 94bb8483e49b
---> 826b6ec210fb
Step 3/14 : COPY --from=composer/composer:latest-bin /composer /usr/bin/composer
latest-bin: Pulling from composer/composer
03385178446b: Pull complete
Digest: sha256:abd63db39eb2565a5af2bece27befd9bdf1041938b5caf200852f3458b8b3592
Status: Downloaded newer image for composer/composer:latest-bin
---> e35c49235357
Step 4/14 : COPY . /app
---> 9b763255dd9c
Step 5/14 : WORKDIR /app
---> Running in 0e7ac73d1906
---> Removed intermediate container 0e7ac73d1906
---> 682fbd38873c
Step 6/14 : RUN composer require google/protobuf && protoc --php_out=proto/php/ --proto_path=proto/prototypes/ $(find proto/prototypes/ -type f)
---> Running in c6714f97ee17
./composer.json has been created
Running composer update google/protobuf
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
- Locking google/protobuf (v4.32.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
Failed to download google/protobuf from dist: The zip extension and unzip/7z commands are both missing, skipping.
Your command-line PHP is using multiple ini files. Run `php --ini` to show them.
Now trying to download from source
- Syncing google/protobuf (v4.32.0) into cache
- Installing google/protobuf (v4.32.0): Cloning 9a9a92ecbe from cache
1 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
No security vulnerability advisories found.
Using version ^4.32 for google/protobuf
---> Removed intermediate container c6714f97ee17
---> e8139ee99fba
Step 7/14 : FROM php:apache
---> 40286d9b5483
Step 8/14 : RUN a2enmod rewrite
---> Running in 57489fb50412
Enabling module rewrite.
To activate the new configuration, you need to run:
service apache2 restart
---> Removed intermediate container 57489fb50412
---> 9b7b7cc53c57
Step 9/14 : COPY --from=builder /app /var/www/html/
---> d298e8ff448c
Step 10/14 : RUN sed -ri -e 'N;N;N;s/(<Directory \/var\/www\/>\n)(.*\n)(.*)AllowOverride None/\1\2\3AllowOverride All/;p;d;' /etc/apache2/apache2.conf
---> Running in 950de9c7cd76
---> Removed intermediate container 950de9c7cd76
---> eeb343537a64
Step 11/14 : ARG VERSION
---> Running in 2efa6197bc67
---> Removed intermediate container 2efa6197bc67
---> eca217dc1c84
Step 12/14 : ENV VERSION=$VERSION
---> Running in 9da775f09a84
---> Removed intermediate container 9da775f09a84
---> 02a2a1b59ed9
Step 13/14 : EXPOSE 80
---> Running in 3fdad48fb347
---> Removed intermediate container 3fdad48fb347
---> 660320708045
Step 14/14 : ENTRYPOINT ["apachectl", "-D", "FOREGROUND"]
---> Running in d4e4abd95973
---> Removed intermediate container d4e4abd95973
---> 12361cbb788f
Successfully built 12361cbb788f
real 0m25.573s
user 0m0.036s
sys 0m0.028s
docker image ls
Output:
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> a0ca4a577e01 2 seconds ago 526MB
<none> <none> 8d7ce1c3eb71 3 seconds ago 619MB
php apache 40286d9b5483 2 days ago 525MB
composer/composer latest-bin ba42955de964 9 days ago 3.12MB
docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
time docker pull benjaminloison/youtube-operational-api
Output:
Using default tag: latest
latest: Pulling from benjaminloison/youtube-operational-api
af107e978371: Pull complete
6480d4ad61d2: Pull complete
95f5176ece8b: Pull complete
0ebe7ec824ca: Pull complete
673e01769ec9: Pull complete
74f0c50b3097: Pull complete
1a19a72eb529: Pull complete
18a46b7b7919: Pull complete
eeedb9a5b59c: Pull complete
257b0c8528f8: Pull complete
622603148f0f: Pull complete
e02bf50206c8: Pull complete
2dfb52203c96: Pull complete
b255b5926ae3: Pull complete
686845d474a1: Pull complete
7d08b9456840: Pull complete
Digest: sha256:db67b999dd938a2929e010907e4f829125cf94a6f3d35949c2a6f17aa055e86f
Status: Downloaded newer image for benjaminloison/youtube-operational-api:latest
docker.io/benjaminloison/youtube-operational-api:latest
real 0m6.048s
user 0m0.018s
sys 0m0.022s
docker image ls
Output:
REPOSITORY TAG IMAGE ID CREATED SIZE
benjaminloison/youtube-operational-api latest 6554cc5cef51 19 months ago 511MB
docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Related to Improve_websites_thanks_to_open_source/issues/2210.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please specify instructions here for people willing to use Docker, but not use Docker Hub?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, the change he needs to make should be manual. You must enter the host and port in the CI/CD and the person looking for the alternative can find it
For example;
docker push 127.0.0.1:9876/YouTube-Api
I'm not sure how we can explain this in the documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seem to be 2 possibilities here related to #discussion_r2303952474:
- keep old
docker-compose
instructions - remove them and add instructions like
docker buildx build --tag youtube_operational_api github.com/Benjamin-Loison/YouTube-operational-API && docker run -p 8080:80 youtube_operational_api
, source: issues/336#issuecomment-3239570586
Do you have an opinion about it?
I updated the code. Are there any expected developments? |
I am fine still adding Docker Hub support, but it seems less urgent to me, I am busy these days, I plan a priori to reconsider this pull request by Thursday evening. |
Is there anything I should do? |
I'll check again your pull request on 11/09/25 evening Paris time or later. |
Is there anything I should do? I need this PR |
Personal note:DuckDuckGo and Google search GitHub pull request diff. The Stack Overflow answer 6188624 helps. Benjamin_Loison/git/issues/110 would help. DuckDuckGo search GitHub checkout pull request. The Stack Overflow answer 30584951:
Output:
Output:
|
Before -> After
What to do
First, you need to generate a secret key. You can generate tokens using the repository owner's username via this link:
https://app.docker.com/accounts/benjaminloison/settings/personal-access-tokens
Then click on the link:
https://github.com/Benjamin-Loison/YouTube-operational-API/settings/secrets/actions
and create the DOCKER_USERNAME and DOCKER_TOKEN parameters. Then confirm this MR.
From this point on, the main branch is assumed to be the stable branch. We may want to change this.
Related to #336