Skip to content
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

Specify target tag when cloning repo with docker build #470

Merged
merged 1 commit into from
Sep 10, 2023

Conversation

eggplants
Copy link
Contributor

@eggplants eggplants commented Sep 10, 2023

what is this pull request about?

fixes #468

does this relate to an existing issue?

#468

does this change any existing behaviour?

no

what does this add?

  • Clone repo's specific tag commit as a HEAD while building docker image.

how do I test this?

Run docker build -t latexindent-test .

$ git clone --depth 1 https://github.com/eggplants/latexindent.pl -b chore/specify-cloning-tag eggplants-pr && cd eggplants-pr
Cloning into 'eggplants-pr'...
remote: Enumerating objects: 5178, done.
remote: Counting objects: 100% (5178/5178), done.
remote: Compressing objects: 100% (2769/2769), done.
remote: Total 5178 (delta 2569), reused 3988 (delta 2183), pack-reused 0
Receiving objects: 100% (5178/5178), 1.57 MiB | 1.37 MiB/s, done.
Resolving deltas: 100% (2569/2569), done.

$ docker build -t latexindent-test .
[+] Building 154.6s (11/11) FINISHED
 => [internal] load build definition from Dockerfile                                                            0.1s
 => => transferring dockerfile: 1.13kB                                                                          0.0s
 => [internal] load .dockerignore                                                                               0.1s
 => => transferring context: 2B                                                                                 0.0s
 => [internal] load metadata for docker.io/library/perl:5.38.0-slim-threaded-buster                             3.5s
 => [1/9] FROM docker.io/library/perl:5.38.0-slim-threaded-buster@sha256:568de3006cfdc1844a733739cb7db5c66d52  43.2s
 => => resolve docker.io/library/perl:5.38.0-slim-threaded-buster@sha256:568de3006cfdc1844a733739cb7db5c66d52d  0.0s
 => => sha256:c8e553a1dc58ad3dd4ef888835b29120fa6abfcad80da6e51acd62eab4cb68d5 27.39MB / 27.39MB               35.5s
 => => sha256:568de3006cfdc1844a733739cb7db5c66d52d65ea4d531cf20484a81fa818332 988B / 988B                      0.0s
 => => sha256:96a3cb10ce9f7f186437d538a783e11e55c365080bdc737c2d0eca43c39163f4 1.16kB / 1.16kB                  0.0s
 => => sha256:34b906e5e62386c0fc664bbada93f740dd2738b151fe047310a4f345d8a29c89 4.96kB / 4.96kB                  0.0s
 => => sha256:91f01557fe0da558070d4f24631c94e91a80877a24621b52b8b13009b62d8d96 27.19MB / 27.19MB               38.4s
 => => sha256:b5eb6256486f3f9f579fb5d9f35a80679d5521f94a848d91e49bef7346310c6c 167B / 167B                      0.9s
 => => sha256:df1b0d79fef315b86cc3df523bf3da8e0b3990f5a30c5f77e386589107c8b50a 164B / 164B                      1.9s
 => => extracting sha256:91f01557fe0da558070d4f24631c94e91a80877a24621b52b8b13009b62d8d96                       1.8s
 => => extracting sha256:b5eb6256486f3f9f579fb5d9f35a80679d5521f94a848d91e49bef7346310c6c                       0.0s
 => => extracting sha256:c8e553a1dc58ad3dd4ef888835b29120fa6abfcad80da6e51acd62eab4cb68d5                       2.3s
 => => extracting sha256:df1b0d79fef315b86cc3df523bf3da8e0b3990f5a30c5f77e386589107c8b50a                       0.0s
 => [2/9] RUN apt-get update     && apt-get install     build-essential     ca-certificates     cmake     git  80.8s
 => [3/9] RUN git clone --depth 1 https://github.com/cmhughes/latexindent.pl --branch "V3.23"                   3.3s
 => [4/9] WORKDIR /latexindent.pl/helper-scripts                                                                0.1s
 => [5/9] RUN echo "Y" | perl latexindent-module-installer.pl                                                  20.2s
 => [6/9] WORKDIR /latexindent.pl/build                                                                         0.1s
 => [7/9] RUN cmake ../path-helper-files && make install && ln -s /usr/local/bin/latexindent.pl /usr/local/bin  0.4s
 => exporting to image                                                                                          2.8s
 => => exporting layers                                                                                         2.7s
 => => writing image sha256:451fccb43ae9b35d4a56862ea01b87e75a9b00ddf15043db4b57c55bdeefb96f                    0.0s
 => => naming to docker.io/library/latexindent-test                                                             0.0s

$ docker image ls latexindent-test
REPOSITORY         TAG       IMAGE ID       CREATED          SIZE
latexindent-test   latest    451fccb43ae9   37 seconds ago   463MB

$ docker run --rm -it latexindent-test --version
3.23, 2023-09-09

anything else?

I'm so sorry for my slow response for #468 (comment)

@github-actions
Copy link

Thank you for your contribution! Please can you change this pull request so that it goes to the develop branch? Thank you

@cmhughes cmhughes marked this pull request as ready for review September 10, 2023 20:14
@cmhughes cmhughes merged commit 4fc7e7e into cmhughes:main Sep 10, 2023
1 check passed
@eggplants eggplants deleted the chore/specify-cloning-tag branch September 10, 2023 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

About 3.23 release
2 participants