Skip to content

Instantly share code, notes, and snippets.

@roychri
Created April 7, 2018 12:17
Show Gist options
  • Save roychri/9d02ebbeb6211f76e2d8a38f19802879 to your computer and use it in GitHub Desktop.
Save roychri/9d02ebbeb6211f76e2d8a38f19802879 to your computer and use it in GitHub Desktop.
Output of Dockerfile build and run
FROM node:9.9.0-alpine
ARG tag=latest
LABEL image=jaumard/test:${tag} \
maintainer="Jaumard" \
base=node:9.9.0-alpine
RUN set -ex
RUN mkdir ~/app
ENV HOME=/home/node/app
WORKDIR $HOME
COPY package.json ./
COPY yarn.lock ./
RUN export NODE_ENV=production
RUN apk add --no-cache --virtual .gyp \
python \
make \
g++ \
&& yarn \
&& apk del .gyp
RUN apk add --no-cache tini
COPY . /home/node/app
RUN chown -R node $HOME
EXPOSE 3000
USER node
ENTRYPOINT [ "tini", "--" ]
CMD [ "node", "server.js" ]
$ docker build --no-cache -t roychri/delete-me .
Sending build context to Docker daemon 5.632kB
Step 1/18 : FROM node:9.9.0-alpine
---> 3e60aa6db49b
Step 2/18 : ARG tag=latest
---> Running in abf28e3fac9d
---> aa982cb58067
Removing intermediate container abf28e3fac9d
Step 3/18 : LABEL image jaumard/test:${tag} maintainer "Jaumard" base node:9.9.0-alpine
---> Running in 40051e6d5b38
---> 7ccb51a3f581
Removing intermediate container 40051e6d5b38
Step 4/18 : RUN set -ex
---> Running in fb91b4f6b102
---> 5179d2c2d1f5
Removing intermediate container fb91b4f6b102
Step 5/18 : RUN mkdir ~/app
---> Running in 5981cf1ad10e
---> cb9e6bb31b9d
Removing intermediate container 5981cf1ad10e
Step 6/18 : ENV HOME /home/node/app
---> Running in f6c38bd6b788
---> ebfc918925b2
Removing intermediate container f6c38bd6b788
Step 7/18 : WORKDIR $HOME
---> 2e5bb2d8d437
Removing intermediate container 39f0d292bc72
Step 8/18 : COPY package.json ./
---> a49bb42bf7e8
Step 9/18 : COPY yarn.lock ./
---> 84f294441add
Step 10/18 : RUN export NODE_ENV=production
---> Running in fa8cc2938efb
---> 7a16d97328b1
Removing intermediate container fa8cc2938efb
Step 11/18 : RUN apk add --no-cache --virtual .gyp python make g++ && yarn && apk del .gyp
---> Running in cf703de91e7b
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
(1/25) Installing libbz2 (1.0.6-r5)
(2/25) Installing expat (2.2.0-r1)
(3/25) Installing libffi (3.2.1-r3)
(4/25) Installing gdbm (1.12-r0)
(5/25) Installing ncurses-terminfo-base (6.0_p20171125-r0)
(6/25) Installing ncurses-terminfo (6.0_p20171125-r0)
(7/25) Installing ncurses-libs (6.0_p20171125-r0)
(8/25) Installing readline (6.3.008-r5)
(9/25) Installing sqlite-libs (3.20.1-r1)
(10/25) Installing python2 (2.7.14-r0)
(11/25) Installing make (4.2.1-r0)
(12/25) Installing binutils-libs (2.28-r3)
(13/25) Installing binutils (2.28-r3)
(14/25) Installing gmp (6.1.2-r0)
(15/25) Installing isl (0.17.1-r0)
(16/25) Installing libgomp (6.3.0-r4)
(17/25) Installing libatomic (6.3.0-r4)
(18/25) Installing pkgconf (1.3.7-r0)
(19/25) Installing mpfr3 (3.1.5-r0)
(20/25) Installing mpc1 (1.0.3-r0)
(21/25) Installing gcc (6.3.0-r4)
(22/25) Installing musl-dev (1.1.16-r14)
(23/25) Installing libc-dev (0.7.1-r0)
(24/25) Installing g++ (6.3.0-r4)
(25/25) Installing .gyp (0)
Executing busybox-1.26.2-r9.trigger
OK: 206 MiB in 38 packages
yarn install v1.5.1
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 0.61s.
WARNING: Ignoring APKINDEX.84815163.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.24d64ab1.tar.gz: No such file or directory
(1/25) Purging .gyp (0)
(2/25) Purging make (4.2.1-r0)
(3/25) Purging g++ (6.3.0-r4)
(4/25) Purging gcc (6.3.0-r4)
(5/25) Purging binutils (2.28-r3)
(6/25) Purging libatomic (6.3.0-r4)
(7/25) Purging libgomp (6.3.0-r4)
(8/25) Purging libc-dev (0.7.1-r0)
(9/25) Purging musl-dev (1.1.16-r14)
(10/25) Purging python2 (2.7.14-r0)
(11/25) Purging libbz2 (1.0.6-r5)
(12/25) Purging expat (2.2.0-r1)
(13/25) Purging libffi (3.2.1-r3)
(14/25) Purging gdbm (1.12-r0)
(15/25) Purging readline (6.3.008-r5)
(16/25) Purging ncurses-libs (6.0_p20171125-r0)
(17/25) Purging ncurses-terminfo (6.0_p20171125-r0)
(18/25) Purging ncurses-terminfo-base (6.0_p20171125-r0)
(19/25) Purging sqlite-libs (3.20.1-r1)
(20/25) Purging binutils-libs (2.28-r3)
(21/25) Purging mpc1 (1.0.3-r0)
(22/25) Purging mpfr3 (3.1.5-r0)
(23/25) Purging isl (0.17.1-r0)
(24/25) Purging gmp (6.1.2-r0)
(25/25) Purging pkgconf (1.3.7-r0)
Executing busybox-1.26.2-r9.trigger
OK: 5 MiB in 13 packages
---> 5db471f437c6
Removing intermediate container cf703de91e7b
Step 12/18 : RUN apk add --no-cache tini
---> Running in d423baf09fe4
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
(1/1) Installing tini (0.14.0-r0)
Executing busybox-1.26.2-r9.trigger
OK: 5 MiB in 14 packages
---> e1001230e679
Removing intermediate container d423baf09fe4
Step 13/18 : COPY . /home/node/app
---> b6f76a0f13c1
Step 14/18 : RUN chown -R node $HOME
---> Running in d39c3e64998c
---> d40446b3f4c2
Removing intermediate container d39c3e64998c
Step 15/18 : EXPOSE 3000
---> Running in 1f36340d1622
---> 43b4cf1255f8
Removing intermediate container 1f36340d1622
Step 16/18 : USER node
---> Running in 906941ad68b5
---> 0bcbb43218b2
Removing intermediate container 906941ad68b5
Step 17/18 : ENTRYPOINT tini --
---> Running in 2e6120a8440c
---> 9c26f2b7f350
Removing intermediate container 2e6120a8440c
Step 18/18 : CMD node server.js
---> Running in d5747a72149f
---> 64b0fb2c97f7
Removing intermediate container d5747a72149f
Successfully built 64b0fb2c97f7
Successfully tagged roychri/delete-me:latest
$
console.log("hi");
$ docker run --rm roychri/delete-me
hi
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment