Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

containers/docker/Dockerfile fails on pip install #647

Open
pastyGRB opened this issue Jun 29, 2024 · 2 comments
Open

containers/docker/Dockerfile fails on pip install #647

pastyGRB opened this issue Jun 29, 2024 · 2 comments

Comments

@pastyGRB
Copy link

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
Copy link

@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
Copy link
Member

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants