-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.withs6
28 lines (21 loc) · 995 Bytes
/
Dockerfile.withs6
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
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.7
# Install the Akita CLI
RUN bash -c "$(curl -L https://releases.akita.software/scripts/install_akita.sh)"
# Install the S6 overlay
ARG S6_OVERLAY_VERSION=3.1.2.1
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz
ENTRYPOINT ["/init"]
# Configure the S6 to run the Akita CLI as a background process
ARG AKITA_DIR=/etc/s6-overlay/s6-rc.d/akita-cli
RUN mkdir -p ${AKITA_DIR}
RUN echo '#!/command/execlineb -P\n\
with-contenv akita apidump --project akibox\n' > ${AKITA_DIR}/run
RUN echo longrun > ${AKITA_DIR}/type
RUN touch /etc/s6-overlay/s6-rc.d/user/contents.d/akita-cli
# Set up Akibox
COPY . /app
# Set the command to run Akibox
CMD /start.sh