-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
37 lines (29 loc) · 1.18 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
# For more information, please refer to https://aka.ms/vscode-docker-python
FROM python:3.8.10-slim-buster
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE 1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED 1
# Creates /viewmask in container if it does not already exist
WORKDIR /viewmask
COPY pyproject.toml pyproject.toml
# Install pip requirements
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update -y && apt-get install -y --no-install-recommends \
# psutil:
"gcc=4:8.3.0-1" \
"libtiff-dev=4.1.0+git191117-2~deb10u2" \
"openslide-tools=3.4.1+dfsg-4" \
&& rm -rf /var/lib/apt/lists/* \
&& python3 -m pip install poetry \
&& poetry config virtualenvs.create false \
&& poetry install
# Ports code into /viewmask
COPY . /viewmask
# Switches to a non-root user and changes the ownership of the /viewmask folder"
# RUN useradd appuser && chown -R appuser /viewmask
# USER appuser
# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
# CMD ["poetry", "run", "viewmask"]
# CMD ["poetry", "run", "python"]
CMD ["bash"]