-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile.local
67 lines (57 loc) · 1.88 KB
/
Dockerfile.local
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
61
62
63
64
65
66
67
FROM debian:12
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
dumb-init \
graphviz \
libargon2-1 \
lbzip2 \
libcairo2 \
libdbus-glib-1-2 \
libfontconfig1 \
libglib2.0-0 \
libgtk-3-0 \
libjpeg62 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libssl-dev \
nodejs \
npm \
xvfb \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ADD https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-US /tmp/firefox.tar
RUN (cd /tmp && tar -xvf firefox.tar) \
&& mv /tmp/firefox /opt/firefox \
&& ln -s /opt/firefox/firefox /usr/bin/firefox \
&& rm /tmp/firefox.tar
ADD https://download.racket-lang.org/installers/8.14/racket-8.14-src-builtpkgs.tgz /tmp/racket.tar.gz
RUN (cd /tmp && tar -xzf racket.tar.gz) \
&& mv /tmp/racket-8.14 /opt/racket \
&& cd /opt/racket/src \
&& ./configure \
&& make \
&& make install \
&& rm /tmp/racket.tar.gz
RUN mkdir /opt/congame
WORKDIR /opt/congame
ADD build.mjs /opt/congame/build.mjs
ADD package-lock.json /opt/congame/package-lock.json
ADD package.json /opt/congame/package.json
ADD resources /opt/congame/resources
ADD tsconfig.json /opt/congame/tsconfig.json
RUN mkdir -p uploads
RUN npm install
RUN npm run-script build
ADD ci/setup-catalogs.sh /opt/congame/ci/setup-catalogs.sh
RUN PATH="$PATH:/opt/racket/bin" ci/setup-catalogs.sh
ADD congame-core /opt/congame/congame-core
RUN /opt/racket/bin/raco pkg install --auto -D congame-core/
ADD conscript /opt/congame/conscript
RUN /opt/racket/bin/raco pkg install --auto -D conscript/
ADD congame-web /opt/congame/congame-web
ADD congame-web-migrations /opt/congame/congame-web-migrations
RUN /opt/racket/bin/raco pkg install --auto -D congame-web/
CMD ["dumb-init", "/opt/racket/bin/racket", "congame-web/dynamic.rkt", "--mode", "local"]