-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
32 lines (25 loc) · 1.09 KB
/
Dockerfile.dev
File metadata and controls
32 lines (25 loc) · 1.09 KB
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
FROM python:3.10-slim-bullseye
# These are things that are almost non-changes so they sort of be anywhere
EXPOSE 5000
ENV POETRY_VERSION=1.2.0
# We need to install some things as root before we switch users
RUN apt update && apt install -y curl
# Establish the runtime user (with no password and no sudo)
# Careful here, the IDs aren't guaranteed to be for that group/user
# and who knows what will happen then!
ARG UID=1001
ARG GID=1001
RUN groupadd -f -g ${GID} -o coolgroup
RUN useradd -m -u ${UID} -g coolgroup -o cooluser
USER cooluser
COPY nonprod-bashrc /home/cooluser/.bashrc
# Now we start making layers that may change over time
RUN curl -sSL https://install.python-poetry.org | python3 -
# Create the space we'll start and build from
# Note that we have the copy commented out, because it is expected we will mount the code here
#COPY . /home/cooluser/workspace
# Start from the basics, our requirements, via poetry
WORKDIR /home/cooluser/workspace
COPY pyproject.toml poetry.lock /home/cooluser/workspace/
RUN /home/cooluser/.local/bin/poetry install -n --only main
CMD ["/usr/bin/env", "bash"]