-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
32 lines (26 loc) · 1008 Bytes
/
Dockerfile
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
31
32
FROM node:8.11.0-alpine
RUN apk update && \
apk upgrade && \
apk add git g++ gcc libgcc libstdc++ linux-headers make python && \
apk update && \
npm install npm@latest -g
# install libsass
RUN git clone https://github.com/sass/sassc && cd sassc && \
git clone https://github.com/sass/libsass && \
SASS_LIBSASS_PATH=/sassc/libsass make && \
mv bin/sassc /usr/bin/sassc && \
cd ../ && rm -rf /sassc
# created node-sass binary
ENV SASS_BINARY_PATH=/usr/lib/node_modules/node-sass/build/Release/binding.node
RUN git clone --recursive https://github.com/sass/node-sass.git && \
cd node-sass && \
git submodule update --init --recursive && \
npm install && \
node scripts/build -f && \
cd ../ && rm -rf node-sass
# add binary path of node-sass to .npmrc
RUN touch $HOME/.npmrc && echo "sass_binary_cache=${SASS_BINARY_PATH}" >> $HOME/.npmrc
# add Prettier
RUN npm install prettier -g
ENV SKIP_SASS_BINARY_DOWNLOAD_FOR_CI true
ENV SKIP_NODE_SASS_TESTS true