Skip to content

Instantly share code, notes, and snippets.

@k0pernikus
Created March 12, 2018 14:11
Show Gist options
  • Save k0pernikus/31272884245a71dcf013b41cb894b4ea to your computer and use it in GitHub Desktop.
Save k0pernikus/31272884245a71dcf013b41cb894b4ea to your computer and use it in GitHub Desktop.
FROM ubuntu:16.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update
RUN apt-get -qq install software-properties-common > /dev/null
RUN apt-add-repository ppa:git-core/ppa > /dev/null
RUN apt-get -qq update && apt-get -qq install python3-pip curl vim net-tools bash
ADD https://deb.nodesource.com/setup_8.x nodesetup.sh
RUN bash ./nodesetup.sh
RUN apt-get -qq install nodejs
RUN node -v
RUN useradd -ou 0 -g 0 -m node
USER node
RUN npm install -g --ignore-scripts --unsafe-perm @angular/cli
@k0pernikus
Copy link
Author

docker build .

will output:

Sending build context to Docker daemon  27.65kB
Step 1/13 : FROM ubuntu:16.04
 ---> f975c5035748
Step 2/13 : ARG DEBIAN_FRONTEND=noninteractive
 ---> Using cache
 ---> fb66318edc1d
Step 3/13 : RUN apt-get -qq update
 ---> Using cache
 ---> ab3d5f91b7f5
Step 4/13 : RUN apt-get -qq install software-properties-common > /dev/null
 ---> Using cache
 ---> b120c228c997
Step 5/13 : RUN apt-add-repository ppa:git-core/ppa > /dev/null
 ---> Using cache
 ---> 94ed60550fd2
Step 6/13 : RUN apt-get -qq update && apt-get -qq install python3-pip curl vim net-tools bash
 ---> Using cache
 ---> d3d8ba8c53a8
Step 7/13 : ADD https://deb.nodesource.com/setup_8.x nodesetup.sh
Downloading [==================================================>]  12.55kB/12.55kB

 ---> Using cache
 ---> ac968fcb85f4
Step 8/13 : RUN bash ./nodesetup.sh
 ---> Using cache
 ---> 757640f7192f
Step 9/13 : RUN apt-get -qq install nodejs
 ---> Using cache
 ---> f877123c13cc
Step 10/13 : RUN node -v
 ---> Using cache
 ---> d4fbd6fbcb4c
Step 11/13 : RUN useradd -ou 0 -g 0 -m node
 ---> Using cache
 ---> ff8b8859901f
Step 12/13 : USER node
 ---> Using cache
 ---> 2582eb5168a0
Step 13/13 : RUN npm install -g --ignore-scripts --unsafe-perm @angular/cli
 ---> Running in 874a174274f1
/usr/bin/ng -> /usr/lib/node_modules/@angular/cli/bin/ng
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/@angular/cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ @angular/[email protected]
added 929 packages in 20.369s
Removing intermediate container 874a174274f1
 ---> 42a7766c56a9
Successfully built 42a7766c56a9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment