Hello,
Sorry if this is a basic question. I’m using the orthanc-python docker image as a starting point and am trying to install additional python packages (e.g., pymongo) that my python script needs. See my dockerfile and docker-compose.yml file below. When I go to build the new docker image I get an error:
Service ‘orthanc’ failed to build : The command ‘/bin/sh -c pip3 install pymongo’ returned a non-zero code: 127
I launched the container without the RUN pip3… command in the dockerfile and poked around the files in the container. I can’t find the pip3 binary anywhere. How can I install additional python packages?
Thanks in advance for any help!
Justin
dockerfile
FROM jodogne/orthanc-python
COPY newImagesArrived.py /etc/orthanc/newImagesArrived.py
COPY orthanc.json /etc/orthanc/orthanc.json
RUN pip3 install pymongo
docker-compose.yml
version: ‘3.1’ networks: default: external: name: metis_default volumes: orthanc-image-storage: services: orthanc: build: . container_name: orthanc hostname: orthanc restart: always expose: - “4242” - “8042” env_file: - ./docker-compose.env volumes: - orthanc-image-storage:/var/lib/orthanc/db
version: ‘3.1’
networks:
default:
external:
name: metis_default
volumes:
orthanc-image-storage:
services:
orthanc:
build: .
container_name: orthanc
hostname: orthanc
restart: always
expose:
- “4242”
- “8042”
env_file: - ./docker-compose.env
volumes: - orthanc-image-storage:/var/lib/orthanc/db