porkcron icon indicating copy to clipboard operation
porkcron copied to clipboard

docker doesnt work

Open KOEGlike opened this issue 10 months ago • 4 comments

Error message:

koeg@koegpi:~/hacker_man/porkcron/docker $ sudo docker compose up
[+] Building 1.2s (6/8)                                                                                  docker:default
 => [porkcron internal] load build definition from Dockerfile                                                      0.0s
 => => transferring dockerfile: 201B                                                                               0.0s
 => [porkcron internal] load metadata for docker.io/library/python:3.10-alpine                                     0.6s
 => [porkcron internal] load .dockerignore                                                                         0.0s
 => => transferring context: 2B                                                                                    0.0s
 => CANCELED [porkcron 1/4] FROM docker.io/library/python:3.10-alpine@sha256:4c4097e46608e9b9025a486e3b72d628ac89  0.2s
 => => resolve docker.io/library/python:3.10-alpine@sha256:4c4097e46608e9b9025a486e3b72d628ac8947a3caa20f142c2e8c  0.1s
 => [porkcron internal] load build context                                                                         0.1s
 => => transferring context: 28B                                                                                   0.0s
 => ERROR [porkcron 2/4] COPY ../porkcron.py /usr/local/bin/porkcron                                               0.0s
------
 > [porkcron 2/4] COPY ../porkcron.py /usr/local/bin/porkcron:
------
failed to solve: failed to compute cache key: failed to calculate checksum of ref da91d289-e192-4654-b549-48514a47e829::l01mpwzo11xr0dylnti3sz5r2: "/porkcron.py": not found

Steps to reproduce:

  1. clone repo
  2. create .env file
  3. cd docker
  4. sudo docker compose up

I use a raspi 5

KOEGlike avatar Feb 23 '25 08:02 KOEGlike

The problem is that the Dockerfile is trying to access files outside its directory, and that is not allowed for security reasones, so you have to move the compose.yml and Dockerfile up one directory outside the docker folder

KOEGlike avatar Feb 23 '25 08:02 KOEGlike

Thanks for the report. Did you try running docker compose up without sudo? Last time I used the Docker method, it worked just fine on Debian.

tmzane avatar Feb 23 '25 11:02 tmzane

Yes

KOEGlike avatar Feb 23 '25 11:02 KOEGlike

I'm also having the same issue, moving the Dockerfile and compose.yml up one folder to the porkcron root folder does not work, as it is now trying to use /home/porkcron/.env

cerruhh avatar Oct 23 '25 15:10 cerruhh