-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
46 lines (34 loc) · 2.01 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
FROM registry.access.redhat.com/ubi9/ubi
MAINTAINER Anthony Green <[email protected]>
ENV LC_ALL=C.utf8 \
LANG=C.utf8 \
LANGUAGE=C.utf8 \
SBCL_VERSION=2.3.10 \
GREEN_ORB_VERSION=0.2.4 \
PATH=/opt/rlgl/.local/bin:$PATH \
HOME=/opt/rlgl
RUN dnf -y install bzip2 git make gcc file poppler-utils gpg
RUN curl -L -O "https://downloads.sourceforge.net/project/sbcl/sbcl/${SBCL_VERSION}/sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2" \
&& tar -xf sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2 \
&& cd sbcl-${SBCL_VERSION}-x86-64-linux \
&& ./install.sh --prefix=/usr/local \
&& cd .. \
&& rm -rf sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2 sbcl-${SBCL_VERSION}-x86-64-linux
RUN useradd -r -u 1000 -m -d /opt/rlgl -s /bin/bash rlgl
WORKDIR /opt/rlgl
COPY . .
RUN chown -R rlgl /opt/rlgl
RUN mkdir -p /var/rlgl/docs /var/rlgl/policy && chown -R 1000:0 /var/rlgl && chmod -R go+rwx /var/rlgl
USER 1000
RUN curl -L -O "https://github.com/atgreen/green-orb/releases/download/v${GREEN_ORB_VERSION}/green-orb-${GREEN_ORB_VERSION}-linux-amd64.tar.gz" \
&& tar xf green-orb-${GREEN_ORB_VERSION}-linux-amd64.tar.gz \
&& rm green-orb-${GREEN_ORB_VERSION}-linux-amd64.tar.gz \
&& echo "# config file here" > green-orb.yaml
RUN git clone --depth=1 https://github.com/ocicl/ocicl.git; cd ocicl; make; make install; ocicl version; ocicl setup > ~/.sbclrc \
&& echo "(asdf:initialize-source-registry '(:source-registry :ignore-inherited-configuration (:tree #P\"/opt/rlgl/\")))" >> ~/.sbclrc \
&& echo "(setf ocicl-runtime:*verbose* t)" >> ~/.sbclrc \
&& echo "(setf ocicl-runtime:*download* t)" >> ~/.sbclrc \
&& cd .. && rm -rf ocicl
RUN ocicl install && ./orb sbcl --non-interactive --eval "(progn (asdf:load-system :rlgl-server) (quit))"
RUN chmod -R go+rwx /opt/rlgl
CMD git config --global --add safe.directory /opt/rlgl && ./orb sbcl --userinit /opt/rlgl/.sbclrc --eval '(asdf:load-system :rlgl-server)' --eval '(progn (rlgl-server:start-rlgl-server) (loop do (sleep 1000)))'