Skip to content

Commit

Permalink
Fix docker build
Browse files Browse the repository at this point in the history
Due to changes in the ISAR image the build has to change to use
multistage builds.
  • Loading branch information
aeshub committed Mar 1, 2023
1 parent c523a0c commit e2b86ed
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Dockerfile.Isar
Original file line number Diff line number Diff line change
@@ -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-turtlebot.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"

0 comments on commit e2b86ed

Please sign in to comment.