forked from opencobra/memote-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (37 loc) · 1.21 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
47
48
49
50
51
FROM python:3.9-slim
LABEL org.opencontainers.image.source=https://github.com/metabolicatlas/memote-docker
LABEL version="0.13"
LABEL description="Docker image of opencobra/memote adapted for MetabolicAtlas/standard-GEM-validation"
ENV PYTHONUNBUFFERED=1
ARG USER_=memote
ARG UID=1000
ARG GID=1000
ENV HOME="/home/${USER_}"
RUN groupadd --system --gid "${GID}" "${USER_}" \
&& useradd --system --create-home --home-dir "${HOME}" \
--uid "${UID}" --gid "${USER_}" "${USER_}"
RUN chown -R "${USER_}:${USER_}" "${HOME}"
RUN set -eux \
&& apt-get update \
&& apt-get install --yes --no-install-recommends \
ca-certificates \
git-core \
openssl \
openssh-client \
procps \
&& pip install --upgrade pip setuptools wheel \
&& rm -rf /root/.cache/pip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /opt
COPY requirements.* /opt/
RUN set -eux \
&& pip install -r requirements.txt \
&& rm -rf /root/.cache/pip
WORKDIR "${HOME}"
# Allow any user ID to run memote in the working directory.
RUN set -eux \
&& chmod o+rx /usr/bin/* /usr/local/bin/* \
&& chmod -R a+rwx "${HOME}"
USER "${USER_}"
CMD ["memote", "-h"]