-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (35 loc) · 1.2 KB
/
Dockerfile
File metadata and controls
43 lines (35 loc) · 1.2 KB
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
FROM fukamachi/qlot:latest as build
RUN --mount=type=cache,target=/var/cache/apt \
--mount=type=cache,target=/var/lib/apt \
set -x; \
apt-get update && \
apt-get install -y \
make \
libffi-dev \
pkg-config \
librabbitmq-dev \
build-essential
RUN ros setup
COPY . /root/
WORKDIR /root/
RUN qlot install
RUN qlot exec sbcl --non-interactive \
--load source/starintel-gserver.asd \
--eval '(ql:quickload :starintel-gserver)' \
--eval "(sb-ext:save-lisp-and-die \"star-server\" :toplevel 'star::main :executable t)"
FROM build as star-server
VOLUME /config
EXPOSE 5000
EXPOSE 4009 # NOTE Debug port do not expose in production.
RUN echo '#!/bin/sh\n\
set -e\n\
# Check if /config/init.lisp exists; if not, use /root/init.lisp\n\
INIT_FILE="/config/init.lisp"\n\
if [ ! -f "$INIT_FILE" ]; then\n\
echo "/config/init.lisp not found. Using default /root/example_configs/init.lisp."\n\
INIT_FILE="/root/example_configs/init.lisp"\n\
fi\n\
# Execute the server with the determined init file\n\
exec /root/star-server start -i "$INIT_FILE"' > /usr/local/bin/entrypoint.sh \
&& chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]