docker / build-push-action

GitHub Action to build and push Docker images with Buildx
https://github.com/marketplace/actions/build-and-push-docker-images
Apache License 2.0
4.28k stars 548 forks source link

GitHub Actions + Docker Build: not creating directory #883

Closed digitalghost-dev closed 1 year ago

digitalghost-dev commented 1 year ago

I have a GitHub Actions workflow where my build is failing because Docker can't install all of libraries from my requirements.txt file.

During the COPY ./requirements.txt . step and after the packages are finished downloading, the install phase stops with the error: ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/nonexistent'

As I was looking through the logs, I noticed:

#7 [2/7] RUN adduser --system nonroot
#0 0.105 Adding system user `nonroot' (UID 100) ...
#0 0.105 Adding new user `nonroot' (UID 100) with group `nogroup' ...
#7 0.117 Not creating `/nonexistent'. <---???
#7 DONE 0.7s

This is a snippet from a CI workflow that succeeded yesterday:

#7 [2/7] RUN adduser --system nonroot
#0 0.099 Adding system user `nonroot' (UID 101) ...
#0 0.099 Adding new user `nonroot' (UID 101) with group `nogroup' ...
#7 0.120 Creating home directory `/home/nonroot' ...
#7 DONE 0.5s

I don't understand what is causing this. My Dockerfile has not changed in months.

FROM python:3.10-slim

RUN adduser --system nonroot
USER nonroot

WORKDIR /home/nonroot
RUN mkdir /home/nonroot/app

COPY ./requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt

COPY . .

CMD ["python3", "standings.py"]

Here is my full ci.yml file.

digitalghost-dev commented 1 year ago

seems to be a local issue. closing.