-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (29 loc) · 885 Bytes
/
Dockerfile
File metadata and controls
30 lines (29 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
ARG FROM_TAG=latest
FROM quay.io/continuouspipe/ubuntu16.04:${FROM_TAG}
# Install node
ARG NODE_VERSION
ENV NODE_VERSION ${NODE_VERSION:-7.x}
ARG INSTALL_COMMON_PACKAGES
ENV INSTALL_COMMON_PACKAGES ${INSTALL_COMMON_PACKAGES:-true}
RUN curl -sL "https://deb.nodesource.com/setup_$NODE_VERSION" > /tmp/install-node.sh \
&& bash /tmp/install-node.sh \
&& apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get -qq -y --no-install-recommends install \
nodejs \
\
# Set up common NPM packages \
&& if [ "$INSTALL_COMMON_PACKAGES" = "true" ]; then \
npm config set --global loglevel warn \
&& npm install --global \
marked \
node-gyp \
gulp \
\
# Install node-sass's linux bindings \
&& npm rebuild node-sass; \
fi \
\
# Clean the image \
&& apt-get auto-remove -qq -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*