Skip to content

Instantly share code, notes, and snippets.

@zeitounator
Created September 22, 2020 15:58
Show Gist options
  • Save zeitounator/f1f009d89288185e211d60cf481f509f to your computer and use it in GitHub Desktop.
Save zeitounator/f1f009d89288185e211d60cf481f509f to your computer and use it in GitHub Desktop.
$ echo Your proposition
Your proposition
$ cat Dockerfile
FROM tomcat:alpine
RUN apk add curl --no-cache \
&& curl -fsSL -o snoop.war https://github.com/AKSarav/SampleWebApp/raw/master/dist/SampleWebApp.war
COPY ./snoop.war /opt/tomcat/tomcat1/webapps/
expose 8443
CMD /usr/local/tomcat/bin/cataline.bat run
$ docker build . --no-cache -t test:test
Sending build context to Docker daemon 2.048kB
Step 1/5 : FROM tomcat:alpine
---> 8b8b1eb786b5
Step 2/5 : RUN apk add curl --no-cache && curl -fsSL -o snoop.war https://github.com/AKSarav/SampleWebApp/raw/master/dist/SampleWebApp.war
---> Running in 88f4eaef0bcb
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
(1/4) Installing nghttp2-libs (1.35.1-r2)
(2/4) Installing libssh2 (1.9.0-r1)
(3/4) Installing libcurl (7.64.0-r4)
(4/4) Installing curl (7.64.0-r4)
Executing busybox-1.29.3-r10.trigger
OK: 94 MiB in 65 packages
Removing intermediate container 88f4eaef0bcb
---> af0a350f926c
Step 3/5 : COPY ./snoop.war /opt/tomcat/tomcat1/webapps/
COPY failed: stat /var/lib/docker/tmp/docker-builder601002356/snoop.war: no such file or directory
$ echo What I\'m trying to explain
What I'm trying to explain
$ cat Dockerfile
FROM tomcat:alpine
RUN apk add curl --no-cache \
&& mkdir -p /opt/tomcat/tomcat1/webapps \
&& curl -fsSL -o /opt/tomcat/tomcat1/webapps/snoop.war https://github.com/AKSarav/SampleWebApp/raw/master/dist/SampleWebApp.war
expose 8443
CMD /usr/local/tomcat/bin/cataline.bat run
$ docker build . --no-cache -t test:test
Sending build context to Docker daemon 2.048kB
Step 1/4 : FROM tomcat:alpine
---> 8b8b1eb786b5
Step 2/4 : RUN apk add curl --no-cache && mkdir -p /opt/tomcat/tomcat1/webapps && curl -fsSL -o /opt/tomcat/tomcat1/webapps/snoop.war https://github.com/AKSarav/SampleWebApp/raw/master/dist/SampleWebApp.war
---> Running in 95ec08374fd4
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
(1/4) Installing nghttp2-libs (1.35.1-r2)
(2/4) Installing libssh2 (1.9.0-r1)
(3/4) Installing libcurl (7.64.0-r4)
(4/4) Installing curl (7.64.0-r4)
Executing busybox-1.29.3-r10.trigger
OK: 94 MiB in 65 packages
Removing intermediate container 95ec08374fd4
---> 2d6320c8e076
Step 3/4 : expose 8443
---> Running in defa49deeab1
Removing intermediate container defa49deeab1
---> b7fb9aac9329
Step 4/4 : CMD /usr/local/tomcat/bin/cataline.bat run
---> Running in 3fde60234817
Removing intermediate container 3fde60234817
---> 5f54acd03300
Successfully built 5f54acd03300
Successfully tagged test:test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment