-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust
Dockerfile
to use with nox -s build_linux
.
- Loading branch information
1 parent
45fd49d
commit 4af2577
Showing
2 changed files
with
36 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,42 @@ | ||
FROM ubuntu:18.04 | ||
|
||
ENV WORKDIR /src | ||
|
||
WORKDIR ${WORKDIR} | ||
|
||
RUN apt update \ | ||
&& apt install -y \ | ||
python3.8 \ | ||
libpython3.8 \ | ||
python3.8-venv \ | ||
python3-pip \ | ||
&& true | ||
# && rm -rf /var/lib/apt/lists/* | ||
|
||
ARG USER_UID="$UID" | ||
ARG USER_GID="$GID" | ||
ARG USER_HOME=/home/user | ||
|
||
RUN groupadd -r user -g "$USER_GID" && \ | ||
useradd -r -g user -u "$USER_UID" -m -d "${USER_HOME}" \ | ||
-s /bin/bash -c "User" user | ||
|
||
USER user | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ARG ROMT_PIP_VERSION=24.0 | ||
ARG ROMT_PIPX_VERSION=1.5.0 | ||
ARG ROMT_POETRY_VERSION=1.8.2 | ||
ARG ROMT_POETRY_PLUGIN_EXPORT_VERSION=1.7.1 | ||
|
||
# Add `~/.local/bin` directory to `PATH` for `pipx` binaries. | ||
ENV PATH="${PATH}:/home/user/.local/bin" | ||
ENV PIPX_HOME=/pipx-lib | ||
ENV PIPX_BIN_DIR=/usr/bin | ||
|
||
RUN python3.8 -m venv /tmp/pipx-venv | ||
RUN /tmp/pipx-venv/bin/pip install "pip==$ROMT_PIP_VERSION" | ||
RUN /tmp/pipx-venv/bin/pip install "pipx==$ROMT_PIPX_VERSION" | ||
RUN mkdir -p /home/user/.local/bin \ | ||
&& ln -s /tmp/pipx-venv/bin/pipx /home/user/.local/bin/pipx | ||
RUN mkdir -p "$PIPX_HOME" \ | ||
&& /tmp/pipx-venv/bin/pipx install "pipx==$ROMT_PIPX_VERSION" | ||
|
||
RUN pipx install "poetry==$ROMT_POETRY_VERSION" \ | ||
&& pipx inject poetry \ | ||
"poetry-plugin-export==$ROMT_POETRY_PLUGIN_EXPORT_VERSION" | ||
RUN poetry config warnings.export false | ||
|
||
# Copy in project dependency specification that don't change often; this | ||
# speeds up incremental rebuilding of the container. | ||
COPY pyproject.toml poetry.lock ./ | ||
RUN poetry install | ||
|
||
COPY README.rst \ | ||
maintainer.rst \ | ||
noxfile.py \ | ||
romt-wrapper.py \ | ||
./ | ||
|
||
# src/ must be mounted. | ||
|
||
ENTRYPOINT ["poetry", "run", "nox", "-s", "build"] |
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