Last active
May 2, 2024 13:32
-
-
Save jsvd/21af59c65dc34463277171b7a3355118 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ cat with_copy/Dockerfile | |
FROM centos:7 | |
COPY logstash-8.13.2-linux-aarch64.tar.gz /tmp/logstash.tar.gz | |
RUN tar -zxf /tmp/logstash.tar.gz && rm /tmp/logstash.tar.gz | |
❯ docker build -q with_copy | |
sha256:fce85351f818038d93afbd4005ff4fe10a2d7771ce1e603a54f91300e4032d1e | |
❯ docker run -it fce85351f818038d93afbd4005ff4fe10a2d7771ce1e603a54f91300e4032d1e /logstash-8.13.2/bin/logstash -V | |
Using bundled JDK: /logstash-8.13.2/jdk | |
logstash 8.13.2 | |
❯ docker inspect fce85351f818038d93afbd4005ff4fe10a2d7771ce1e603a54f91300e4032d1e | grep -i size | |
"Size": 1371328225, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ cat with_copy_multistage/Dockerfile | |
FROM centos:7 as stage1 | |
COPY logstash-8.13.2-linux-aarch64.tar.gz /tmp/logstash.tar.gz | |
RUN tar -zxf /tmp/logstash.tar.gz | |
FROM centos:7 | |
COPY --from=stage1 /logstash-8.13.2 /logstash-8.13.2 | |
❯ docker build -q with_copy_multistage | |
sha256:d7c200c12deddd6811d7bdd63f756860f28110ec70edf13ebac2d0bc4d996266 | |
❯ docker run -it d7c200c12deddd6811d7bdd63f756860f28110ec70edf13ebac2d0bc4d996266 /logstash-8.13.2/bin/logstash -V | |
Using bundled JDK: /logstash-8.13.2/jdk | |
logstash 8.13.2 | |
❯ docker inspect d7c200c12deddd6811d7bdd63f756860f28110ec70edf13ebac2d0bc4d996266 | grep -i size | |
"Size": 970464365, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ cat with_curl/Dockerfile | |
FROM centos:7 | |
RUN curl https://artifacts.elastic.co/downloads/logstash/logstash-8.13.2-linux-aarch64.tar.gz | tar -zxf - | |
❯ docker build -q with_curl | |
sha256:079c521ba65fc813e8e18c1243c320e61b285e99256236b90460897e2629d3e2 | |
❯ docker run -it 079c521ba65fc813e8e18c1243c320e61b285e99256236b90460897e2629d3e2 /logstash-8.13.2/bin/logstash -V | |
Using bundled JDK: /logstash-8.13.2/jdk | |
logstash 8.13.2 | |
❯ docker inspect 079c521ba65fc813e8e18c1243c320e61b285e99256236b90460897e2629d3e2 | grep -i size | |
"Size": 970484845, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment