-
Notifications
You must be signed in to change notification settings - Fork 20
/
Dockerfile
38 lines (31 loc) · 1001 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
ARG SLURM_VER=23.02
FROM brianmay/slurm:${SLURM_VER}
# Install OS dependencies
RUN apt-get update \
&& apt-get install -y \
gcc sudo libcrack2-dev netcat \
&& rm -rf /var/lib/apt/lists/*
# Make application directory
RUN mkdir /opt/karaage /opt/karaage/requirements
WORKDIR /opt/karaage
# Install our requirements.
RUN pip install poetry==1.3.0
ADD pyproject.toml poetry.lock /opt/karaage/
RUN poetry config virtualenvs.create false
RUN poetry install --no-dev --no-root
# Copy all our files into the image.
COPY . /opt/karaage/
RUN chmod go+rX -R /opt/karaage/
# Setup access to version information
ARG VERSION=
ARG BUILD_DATE=
ARG VCS_REF=
ENV VERSION=${VERSION}
ENV BUILD_DATE=${BUILD_DATE}
ENV VCS_REF=${VCS_REF}
ENV KARAAGE_CONFIG_FILE=/etc/karaage3/settings.py
# Specify the command to run when the image is run.
EXPOSE 8000
VOLUME '/etc/karaage3' '/var/log' '/var/lib/karaage3' '/var/cache/karaage3'
ENTRYPOINT [ "/opt/karaage/scripts/docker.sh" ]
CMD /opt/karaage/scripts/start.sh