-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53e7286
commit a3ac472
Showing
2 changed files
with
145 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
ARG PYTHON_VERSION | ||
FROM python:${PYTHON_VERSION}-bullseye AS builder-image | ||
|
||
ARG TARGETPLATFORM | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG REMOTECV_VERSION | ||
|
||
RUN apt-get update && \ | ||
apt-get -y upgrade && \ | ||
apt-get -y autoremove && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
|
||
RUN python3 -m venv /home/remotecv/venv | ||
ENV PATH="/home/remotecv/venv/bin:$PATH" | ||
|
||
RUN pip3 install --no-cache-dir wheel && \ | ||
pip3 install --no-cache-dir remotecv==${REMOTECV_VERSION} | ||
|
||
FROM python:${PYTHON_VERSION}-slim-bullseye AS runner-image | ||
|
||
RUN apt-get update && \ | ||
apt-get -y upgrade && \ | ||
apt-get -y autoremove && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN useradd --create-home remotecv | ||
COPY --from=builder-image /home/remotecv/venv /home/remotecv/venv | ||
|
||
USER remotecv | ||
|
||
EXPOSE 8888 | ||
|
||
ENV PYTHONUNBUFFERED=1 | ||
|
||
ENV VIRTUAL_ENV=/home/remotecv/venv | ||
ENV PATH="/home/remotecv/venv/bin:$PATH" | ||
|
||
ENTRYPOINT ["remotecv"] |