-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathDockerfile
60 lines (51 loc) · 1.68 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM node:19.1.0
MAINTAINER Dan Lynn <[email protected]>
# ember server on port 4200
# livereload server on port 7020 (changed in v2.17.0 from 49153)
# test server on port 7357
EXPOSE 4200 7020 7357
WORKDIR /myapp
# run ember server on container start
CMD ["ember", "server"]
# Install watchman build dependencies
RUN \
apt-get update -y &&\
apt-get install -y python-dev
# install watchman
# Note: See the README.md to find out how to increase the
# fs.inotify.max_user_watches value so that watchman will
# work better with ember projects.
RUN \
git clone --branch=v4.9.0 --depth=1 https://github.com/facebook/watchman.git &&\
cd watchman &&\
./autogen.sh &&\
CXXFLAGS=-Wno-error ./configure &&\
make &&\
make install
# install bower
RUN \
npm install -g [email protected]
# install chrome for default testem config (as of ember-cli 2.15.0)
RUN \
apt-get update &&\
apt-get install -y \
apt-transport-https \
gnupg \
--no-install-recommends &&\
curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - &&\
echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list &&\
apt-get update &&\
apt-get install -y \
google-chrome-stable \
--no-install-recommends
# tweak chrome to run with --no-sandbox option
RUN \
sed -i 's/"$@"/--no-sandbox "$@"/g' /opt/google/chrome/google-chrome
# set container bash prompt color to blue in order to
# differentiate container terminal sessions from host
# terminal sessions
RUN \
echo 'PS1="\[\\e[0;94m\]${debian_chroot:+($debian_chroot)}\\u@\\h:\\w\\\\$\[\\e[m\] "' >> ~/.bashrc
# install ember-cli
RUN \
npm install -g [email protected]