question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error building Docker image in a fresh project

See original GitHub issue

Hello!

Thanks for this great package! Lately, I have started encountering an error when creating a new project (no modifications) and building the docker image from the provided Dockerfile.

[+] Building 22.9s (11/14)
 => [internal] load build definition from Dockerfile                                                                                                                                                          0.0s
 => => transferring dockerfile: 617B                                                                                                                                                                          0.0s
 => [internal] load .dockerignore                                                                                                                                                                             0.0s
 => => transferring context: 35B                                                                                                                                                                              0.0s
 => [internal] load metadata for docker.io/library/python:3.9.6-slim-buster                                                                                                                                   1.5s
 => [ 1/10] FROM docker.io/library/python:3.9.6-slim-buster@sha256:28bed4c51c3b531159d8affc0225701edb16a7deacfdfdfb220a944405c39314                                                                           0.0s
 => [internal] load build context                                                                                                                                                                             0.0s
 => => transferring context: 5.60kB                                                                                                                                                                           0.0s
 => CACHED [ 2/10] RUN apt-get update && apt-get install -y   gcc   && rm -rf /var/lib/apt/lists/*                                                                                                            0.0s
 => [ 3/10] RUN pip install setuptools wheel poetry==1.1.13                                                                                                                                                  13.9s
 => [ 4/10] RUN poetry config virtualenvs.create false                                                                                                                                                        0.5s
 => [ 5/10] COPY pyproject.toml poetry.lock /app/src/                                                                                                                                                         0.0s
 => [ 6/10] WORKDIR /app/src                                                                                                                                                                                  0.0s
 => ERROR [ 7/10] RUN poetry install                                                                                                                                                                          6.9s
------
 > [ 7/10] RUN poetry install:
#0 0.367 Skipping virtualenv creation, as specified in config file.
#0 0.931 Installing dependencies from lock file
#0 1.716
#0 1.716 Package operations: 81 installs, 1 update, 1 removal
#0 1.716
#0 1.717   • Removing setuptools (65.5.0)
#0 1.933   • Installing smmap (5.0.0)
#0 2.558   • Installing gitdb (4.0.9)
#0 2.559   • Installing mccabe (0.6.1)
#0 2.560   • Installing pbr (5.11.0)
#0 2.562   • Installing pycodestyle (2.8.0)
#0 2.564   • Installing pyflakes (2.4.0)
#0 3.497   • Installing docutils (0.19)
#0 3.498   • Installing flake8 (4.0.1)
#0 3.499   • Installing gitpython (3.1.29)
#0 3.500   • Installing pyyaml (6.0)
#0 3.502   • Installing sniffio (1.3.0)
#0 3.504   • Installing snowballstemmer (2.2.0)
#0 3.505   • Installing stevedore (4.1.0)
#0 4.560   • Installing anyio (3.6.2)
#0 4.562   • Installing attrs (22.1.0)
#0 4.563   • Installing bandit (1.7.4)
#0 4.563   • Installing eradicate (2.1.0)
#0 4.564   • Installing exceptiongroup (1.0.0)
#0 4.568   • Installing flake8-polyfill (1.0.2)
#0 4.569   • Installing iniconfig (1.1.1)
#0 4.569   • Installing h11 (0.12.0)
#0 4.570   • Installing isort (5.10.1)
#0 5.331   • Updating packaging (20.9 -> 21.3)
#0 5.438   • Installing pluggy (1.0.0)
#0 5.491   • Installing pydocstyle (6.1.1)
#0 5.512   • Installing pygments (2.13.0)
#0 5.572   • Installing restructuredtext-lint (1.4.0)
#0 5.605   • Installing tomli (2.0.1)
#0 5.617   • Installing typing-extensions (4.4.0)
#0 6.288
#0 6.288   EnvCommandError
#0 6.288
#0 6.288   Command ['/usr/local/bin/python', '-m', 'pip', 'install', '--no-deps', '/root/.cache/pypoetry/artifacts/04/32/b5/e5036c2c17882570082f8f5147166579794efaa6ebc2fc7ab5a0aea9cb/restructuredtext_lint-1.4.0.tar.gz'] errored with the following return code 1, and output:
#0 6.288   Processing /root/.cache/pypoetry/artifacts/04/32/b5/e5036c2c17882570082f8f5147166579794efaa6ebc2fc7ab5a0aea9cb/restructuredtext_lint-1.4.0.tar.gz
#0 6.288       ERROR: Command errored out with exit status 1:
#0 6.288        command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-4yuak16k/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-4yuak16k/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-gjjq5qo1
#0 6.288            cwd: /tmp/pip-req-build-4yuak16k/
#0 6.288       Complete output (3 lines):
#0 6.288       Traceback (most recent call last):
#0 6.288         File "<string>", line 1, in <module>
#0 6.288       ModuleNotFoundError: No module named 'setuptools'
#0 6.288       ----------------------------------------
#0 6.288   WARNING: Discarding file:///root/.cache/pypoetry/artifacts/04/32/b5/e5036c2c17882570082f8f5147166579794efaa6ebc2fc7ab5a0aea9cb/restructuredtext_lint-1.4.0.tar.gz. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
#0 6.288   ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
#0 6.288   WARNING: You are using pip version 21.2.4; however, version 22.3 is available.
#0 6.288   You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
#0 6.288
#0 6.289
#0 6.289   at /usr/local/lib/python3.9/site-packages/poetry/utils/env.py:1195 in _run
#0 6.317       1191│                 output = subprocess.check_output(
#0 6.317       1192│                     cmd, stderr=subprocess.STDOUT, **kwargs
#0 6.317       1193│                 )
#0 6.317       1194│         except CalledProcessError as e:
#0 6.317     → 1195│             raise EnvCommandError(e, input=input_)
#0 6.317       1196│
#0 6.318       1197│         return decode(output)
#0 6.318       1198│
#0 6.318       1199│     def execute(self, bin, *args, **kwargs):
#0 6.318
------
failed to solve: executor failed running [/bin/sh -c poetry install]: exit code: 1

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
s3riuscommented, Nov 3, 2022

Will add today.

1reaction
jegorkcommented, Oct 27, 2022

@s3rius no problem! Thanks for a quick update.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error in creating new docker image from my project file
On my windows 10 machine, when I am trying to create a docker image of my solution/project it is giving me following error...
Read more >
An error occurred while attempting to build Docker image #3884
Create new project from ASP.NET Core 3 API template with Enable Docker Support checked. This is the sample DockerFile.
Read more >
How to Fix and Debug Docker Containers Like a Superhero
Container errors are tricky to diagnose, but some investigative magic works wonders. Read along to learn how to debug Docker containers.
Read more >
Cannot build docker image from .Net Core project
I create an empty ASP.NET CORE API project. and try to build it on docker. when I hit the debug button I get...
Read more >
Image-building best practices - Docker Documentation
When you have built an image, it is a good practice to scan it for security vulnerabilities using the docker scan command. Docker...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found