forked from CenterForOpenScience/ember-osf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
60 lines (50 loc) · 1.49 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:8
RUN apt-get update \
&& apt-get install -y \
git \
# Next 2 needed for yarn
apt-transport-https \
ca-certificates \
# watchman
build-essential \
automake \
autoconf \
python-dev \
&& apt-get clean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install -y \
yarn \
&& apt-get clean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
ENV WATCHMAN_VERSION 4.7.0
RUN cd /tmp \
&& git clone https://github.com/facebook/watchman.git \
&& cd watchman \
&& git checkout v$WATCHMAN_VERSION \
&& ./autogen.sh \
&& ./configure --enable-statedir=/tmp \
&& make \
&& make install \
&& mv watchman /usr/local/bin/watchman \
&& rm -Rf /tmp/watchman
RUN mkdir -p /code
WORKDIR /code
COPY ./package.json ./yarn.lock /code/
RUN yarn --pure-lockfile --ignore-engines
COPY ./.bowerrc /code/.bowerrc
COPY ./bower.json /code/bower.json
RUN ./node_modules/bower/bin/bower install --allow-root --config.interactive=false
COPY ./ /code/
ARG GIT_COMMIT=
ENV GIT_COMMIT ${GIT_COMMIT}
ARG APP_ENV=production
ENV APP_ENV ${APP_ENV}
ARG BACKEND=local
ENV BACKEND ${BACKEND}
RUN ./node_modules/ember-cli/bin/ember build --env ${APP_ENV}
CMD ["yarn", "test"]