-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
38 lines (31 loc) · 930 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
33
34
35
36
37
38
FROM buildpack-deps:bionic
RUN set -ex; \
useradd --create-home codewarrior; \
mkdir -p /workspace; \
chown -R codewarrior: /workspace;
RUN set -ex; \
curl -sL https://deb.nodesource.com/setup_16.x | bash -; \
apt-get install -y nodejs; \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/*;
RUN npm install -g [email protected];
RUN npm install -g [email protected];
COPY --chown=codewarrior:codewarrior workspace/ /workspace
WORKDIR /workspace
USER codewarrior
ENV USER=codewarrior \
HOME=/home/codewarrior \
PATH=/opt/purescript:$PATH
RUN set -ex; \
cd /workspace; \
npm install; \
# install packages
spago install; \
# compile packages
spago build; \
# ensure running `Main.purs` works
spago run; \
# ensure testing works
spago test || true; \
# clean up
rm -rf ./src/Main.purs ./output/Main/ ./test/Example/ ./output/Example.ExampleSpec/;