-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile.dev
69 lines (49 loc) · 1.7 KB
/
Dockerfile.dev
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM ghcr.io/wtsi-npg/ub-18.04-baton-irods-4.2.11:latest
ARG PYTHON_VERSION=3.12
ENV DEBIAN_FRONTEND=noninteractive
USER root
RUN apt-get update && \
apt-get install -q -y --no-install-recommends \
apt-transport-https \
apt-utils \
build-essential \
ca-certificates \
curl \
gcc \
git \
make \
libbz2-dev \
libffi-dev \
libncurses-dev \
libreadline-dev \
libssl-dev \
zlib1g-dev
# Install the iRODS icommands package because it's useful for interactions with \
# the server during development
RUN echo "deb [arch=amd64] https://packages.irods.org/apt/ $(lsb_release -sc) main" |\
tee /etc/apt/sources.list.d/renci-irods.list && \
apt-get update && \
apt-get install -q -y --no-install-recommends \
irods-icommands="4.2.11-1~$(lsb_release -sc)"
WORKDIR /app
# It's more practical to build from an iRODS client image and install recent Python
# than to build from a recent Python image and install iRODS clients.
ENV PYENV_ROOT="/app/.pyenv"
# Put PYENV first to ensure we use the pyenv-installed Python
ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
COPY ./docker/install_pyenv.sh /app/docker/install_pyenv.sh
RUN /app/docker/install_pyenv.sh
ENV MAKE_OPTS="-j 8"
RUN pyenv install "$PYTHON_VERSION"
RUN pyenv global "$PYTHON_VERSION"
COPY requirements.txt test-requirements.txt /app/
RUN pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir -r test-requirements.txt
COPY . /app
RUN pip install --no-cache-dir . && \
git status && \
ls -al
RUN chown -R appuser:appuser /app
USER appuser
ENTRYPOINT ["/app/docker/entrypoint.sh"]
CMD ["/bin/bash"]