forked from PandABlocks/PandABlocks-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (28 loc) · 1.02 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
# This file is for use as a devcontainer and a runtime container
#
# The devcontainer should use the build target and run as root with podman
# or docker with user namespaces.
#
FROM python:3.11 as build
ARG PIP_OPTIONS=.
# Add any system dependencies for the developer/build environment here e.g.
# RUN apt-get update && apt-get upgrade -y && \
# apt-get install -y --no-install-recommends \
# desired-packages \
# && rm -rf /var/lib/apt/lists/*
# set up a virtual environment and put it in PATH
RUN python -m venv /venv
ENV PATH=/venv/bin:$PATH
# Copy any required context for the pip install over
COPY . /context
WORKDIR /context
# install python package into /venv
RUN pip install ${PIP_OPTIONS}
FROM python:3.11-slim as runtime
# Add apt-get system dependecies for runtime here if needed
# copy the virtual environment from the build stage and put it in PATH
COPY --from=build /venv/ /venv/
ENV PATH=/venv/bin:$PATH
# change this entrypoint if it is not the same as the repo
ENTRYPOINT ["pandablocks"]
CMD ["--version"]