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

Unable to install dependencies when using scraper image in CircleCI #27

Open
lanegoolsby opened this issue Feb 22, 2023 · 5 comments
Open

Comments

@lanegoolsby
Copy link

lanegoolsby commented Feb 22, 2023

Description

It appears that after yesterday's change any attempt to install dependencies onto the scraper image fails due to lack of permissions.

In order for us to use the crawler we have to install some our of custom CA certs. Otherwise the crawler will not trust the certificates our internal sites use and cannot therefore connect via HTTPS.

We haven't changed anything on our end for many months and run several crawls a day. We ran several crawls yesterday and they all worked. Suddenly today we're seeing this error in CircleCI.
image

Steps to reproduce

  1. Create a Dockerfile
FROM typesense/docsearch-scraper
RUN apt-get update && apt-get install -y git openssh-client
# RUN curl -sSLk https://[our internal site]/install-certs | bash -
# RUN cat /usr/local/share/ca-certificates/* > /usr/local/share/ca_bundle.pem
# ENV REQUESTS_CA_BUNDLE "/usr/local/share/ca_bundle.pem"

You'll see this:
image

I have tried running the command with sudo but it fails as well.

@lanegoolsby
Copy link
Author

I'm starting to think the whole image is corrupt.

I was able to work around the permission issue by setting the docker image to run as root. That allowed the deps to be installed. But when it came to run the crawl this error is being thrown:

Creating a virtualenv for this project...
Pipfile: /root/Pipfile
Using /usr/bin/python3 (3.10.6) to create virtualenv...
 ating virtual environment... ating virtual environment... ating virtual environment... ating virtual environment... ating virtual environment... ating virtual environment... ating virtual environment... ating virtual environment... ating virtual environment... ating virtual environment...  Creating virtual environment...created virtual environment CPython3.10.6.final.0-64 in 680ms
  creator CPython3Posix(dest=/root/.local/share/virtualenvs/root-BuDEOXnJ, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv)
    added seed packages: pip==23.0, setuptools==67.1.0, wheel==0.38.4
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

Successfully created virtual environment!
  Creating virtual environment...
Virtualenv location: /root/.local/share/virtualenvs/root-BuDEOXnJ
Creating a Pipfile for this project...
/root/.local/share/virtualenvs/root-BuDEOXnJ/bin/python: Error while finding module specification for 'src.index' (ModuleNotFoundError: No module named 'src')

Exited with code exit status 1

@lanegoolsby
Copy link
Author

FYI - in the process of working through #28 I found a spot where we were setting the working directory to /app. I changed that to be ~/app and while it didn't solve the problem it did show a error that closer jives with my earlier screen shots.

image

@jasonbosco
Copy link
Member

May I know what version of Docker engine you're using?

@lanegoolsby
Copy link
Author

Locally I am using Rancher Desktop. docker -v generates: Docker version 20.10.21-rd, build ac29474. I'm not sure what version of Docker is being used by CircleCI but it should be fairly recent.

@lanegoolsby
Copy link
Author

I just tried pulling latest and got a slightly different error. Figured I'd share in case its helpful.

sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
The command '/bin/sh -c curl -sSLk https://url.to.a/script | bash -' returned a non-zero code: 1

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

2 participants