From 932a92e432d4e72ef3f0f17794fe64b1b2c9b722 Mon Sep 17 00:00:00 2001 From: Thomas Sundvoll Date: Wed, 8 Feb 2023 15:39:11 +0100 Subject: [PATCH] Update dockerfile and pyproject --- .dockerignore | 8 +++++++- Dockerfile | 15 ++++++++------- pyproject.toml | 8 +------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.dockerignore b/.dockerignore index 5ceb3864..6ab173dc 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,7 @@ -venv +* +!src/isar_robot +!setup.py +!setup.cfg +!pyproject.toml +!README.md +!LICENSE diff --git a/Dockerfile b/Dockerfile index b50f3efe..ebcdb233 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,11 @@ -FROM ghcr.io/equinor/isar:latest +FROM python:3.10-slim as builder -ARG ROBOT_REPOSITORY_CLONE_URL=https://github.com/equinor/isar-robot.git +RUN python -m venv --copies /opt/venv +ENV PATH="/opt/venv/bin:$PATH" -RUN pip install git+${ROBOT_REPOSITORY_CLONE_URL}@main +COPY . . +RUN pip install . -RUN useradd -ms /bin/bash --uid 1001 isar -RUN chown -R 1001 /app -RUN chmod 755 /app -USER 1001 +FROM ghcr.io/equinor/isar:latest +COPY --from=builder /opt/venv /opt/venv +ENV PATH="/opt/venv/bin:$PATH" diff --git a/pyproject.toml b/pyproject.toml index dd3021ed..638dd9c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,3 @@ [build-system] -requires = [ - "setuptools>=42", - "wheel", - "setuptools_scm>=6.2" -] +requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" - -[tool.setuptools_scm]