-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.ci
37 lines (27 loc) · 872 Bytes
/
Dockerfile.ci
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
FROM clojure:openjdk-8-lein
# Install npm
RUN apt-get update -yq \
&& apt-get install curl gnupg -yq \
&& curl -sL https://deb.nodesource.com/setup_12.x | bash \
&& apt-get install nodejs -yq
# For Karma
RUN apt-get install -yq chromium
WORKDIR /app
COPY project.clj .
RUN lein deps
COPY package.json .
RUN npm i
COPY src src
COPY resources resources
COPY test test
# Optimus can only load the assets from the resources folder but npm installs them on the root folder
RUN ln -s ../node_modules resources/node_modules
# Create chromium wrapper with required flags for karma
RUN \
mv /usr/bin/chromium /usr/bin/chromium-origin && \
echo $'#!/usr/bin/env sh\n\
chromium-origin --no-sandbox --headless --disable-gpu $@' > /usr/bin/chromium && \
chmod +x /usr/bin/chromium
# For karma-chrome-launcher
ENV CHROME_BIN /usr/bin/chromium
CMD ["lein", "ci"]