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.

Building a Dockerfile on 3.12.0

See original GitHub issue
2021-10-13 13:00:54 (90.0 MB/s) - ‘Python-3.9.1.tgz’ saved [25372998/25372998]

ls: cannot access '.': Operation not permitted
configure: error: working directory cannot be determined
The command '/bin/sh -c apt-get install -y     build-essential     zlib1g-dev     libncurses5-dev     libgdbm-dev     libnss3-dev     libssl-dev     libsqlite3-dev     libreadline-dev     libffi-dev     curl     libbz2-dev &&    wget https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tgz &&    tar -xf Python-3.9.1.tgz &&    cd Python-3.9.1 &&    ./configure --enable-optimizations &&    make -j 2 &&    sudo make altinstall' returned a non-zero code: 2

Exited with code exit status 2

This is the error when trying to run the following command in a dockerfile. The user is set to root, with no workdir specified. Any Ideas?

The Dockerfile correctly builds on 3.11.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
ntimilsina-fieldwirecommented, Nov 26, 2021

This helped us today!

Thanks for reporting it here and also for the detailed explanation!

2reactions
code-ashercommented, Oct 29, 2021

Nice find! I am glad that sorted you out. I bet there was some kind of change to the mounting logic and the newer version creates the workdir while the older version did not.

Just FYI with Dockerfiles each RUN command is separate so if you cd it will not affect the other RUNs which means you have to do RUN cd dir && mycommand.

Read more comments on GitHub >

github_iconTop Results From Across the Web

StaPH-B Docker User Guide
In order to build your own docker image you need a Dockerfile . This file is basically a set of instructions that are...
Read more >
docker build - Docker Documentation
The docker build command builds Docker images from a Dockerfile and a “context”. A build's context is the set of files located in...
Read more >
Issues - GitHub
This issue is specific to docker buildkit using --output command with docker build. Using DOCKER_BUILDKIT=1 Same dockerfile works fine with ...
Read more >
How To Configure Java Heap Size Inside a Docker Container
Here, we see that the JVM sets its heap size to approximately 25% of the available RAM. In this example, it allocated 4GB...
Read more >
Golang docker file for debug - Stack Overflow
/app WORKDIR /app RUN CGO_ENABLED=0 GOOS=linux go build -gcflags="all=-N -l" -o main ./... FROM alpine:3.12.0 AS production COPY ...
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