oracle / oci-designer-toolkit

OCI designer toolKIT (OKIT) is a set of tools for enabling design, deploy and visualise OCI environments through a graphical web based interface.
Universal Permissive License v1.0
260 stars 122 forks source link

containers/docker/Dockerfile fails on pip install #647

Open pastyGRB opened 1 week ago

pastyGRB commented 1 week ago

Line 42/43 fails when running containers/docker/Dockerfile with the prescribed build command as documented in the readme file: docker build --tag okit --file ./containers/docker/Dockerfile --force-rm .

ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt' Removing intermediate container 212b1c597e3e The command '/bin/sh -c yum install -y oraclelinux-developer-release-el8 && yum update -y && yum install -y git openssl python38 python3-pip && rm -rf /var/cache/yum && echo 'Host *' > /etc/ssh/ssh_config && echo ' StrictHostKeyChecking no' >> /etc/ssh/ssh_config && echo ' UserKnownHostsFile=/dev/null' >> /etc/ssh/ssh_config && python3 -m pip install --upgrade pip && python3 -m pip install --no-cache-dir -r requirements.txt && mkdir -p /okit/{config,git,instance/git,instance/local,instance/templates/user,local,log,ssl,visualiser,okitweb,workspace,skeletons} && openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /okit/ssl/okit.key -out /okit/ssl/okit.crt -subj "/C=GB/ST=Berkshire/L=Reading/O=Oracle/OU=OKIT/CN=www.oci_okit.com"' returned a non-zero code: 1

The issue is that the requirements.txt file does not exist because it has not been copied into the image.

RyanMarkoff-eaton commented 1 week ago

@pastyGRB I was able to resolve this by adding this to the Dockerfile after the Exposed Ports and before the #yum install repos and copied the requirements.txt from the oci-designer/requirements.txt to the container/ folder

COPY containers/requirements.txt .

toxophilist commented 1 day ago

@pastyGRB use the root level Dockerfile there is an issue with the on in containers directory or use The command show in the root readme