Hello all,
I am trying to create a customize docker image with plugins for Metbox. There are several documentations. At least I am following
Using Netbox Plugins · netbox-community/netbox-docker Wiki
What I get typing “docker compose build --no-cache” is:
root@net-netboxtest:/opt/netbox/netbox-docker# docker compose build --no-cache
[+] Building 0.5s (8/12)
=> [internal] load local bake definitions 0.0s
=> => reading from stdin 547B 0.0s
=> [internal] load build definition from Dockerfile-Plugins 0.0s
=> => transferring dockerfile: 1.18kB 0.0s
=> [internal] load metadata for docker.io/netboxcommunity/netbox:latest 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 234B 0.0s
=> CACHED [1/7] FROM docker.io/netboxcommunity/netbox:latest 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 172B 0.0s
=> [2/7] COPY ./plugin_requirements.txt /opt/netbox/ 0.1s
=> ERROR [3/7] RUN /root/.local/bin/uv pip install -r /opt/netbox/plugin_requirements.txt 0.3s
------
> [3/7] RUN /root/.local/bin/uv pip install -r /opt/netbox/plugin_requirements.txt:
0.243 /bin/sh: 1: /root/.local/bin/uv: not found
------
[+] build 0/1
⠙ Image netbox:latest-plugins Building 0.6s
Dockerfile-Plugins:11
--------------------
9 | #COPY /opt/netbox/netbox-docker/plugin_requirements.txt /opt/netbox/
10 |
11 | >>> RUN /root/.local/bin/uv pip install -r /opt/netbox/plugin_requirements.txt
12 |
13 |
--------------------
failed to solve: process "/bin/sh -c /root/.local/bin/uv pip install -r /opt/netbox/plugin_requirements.txt" did not complete successfully: exit code: 127
root@muesrv01-nbtest:/opt/netbox/netbox-docker# ls /opt/netbox/
devicetype-library netbox-docker
root@muesrv01-nbtest:/opt/netbox/netbox-docker# => CACHED [1/7] FROM docker.io/netboxcommunity/netbox:latest 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 172B 0.0s
=> [2/7] COPY ./plugin_requirements.txt /opt/netbox/ 0.1s
=> ERROR [3/7] RUN /root/.local/bin/uv pip install -r /opt/netbox/plugin_requirements.txt 0.3s
------
> [3/7] RUN /root/.local/bin/uv pip install -r /opt/netbox/plugin_requirements.txt:
0.243 /bin/sh: 1: /root/.local/bin/uv: not found
------
[+] build 0/1
⠙ Image netbox:latest-plugins Building 0.6s
Dockerfile-Plugins:11
--------------------
9 | #COPY /opt/netbox/netbox-docker/plugin_requirements.txt /opt/netbox/
10 |
11 | >>> RUN /root/.local/bin/uv pip install -r /opt/netbox/plugin_requirements.txt
12 |
13 |
--------------------
failed to solve: process "/bin/sh -c /root/.local/bin/uv pip install -r /opt/netbox/plugin_requirements.txt" did not complete successfully: exit code: 127
What I see is that the line
[2/7] COPY ./plugin_requirements.txt /opt/netbox/
does not copy the .txt file to its locatin. Coping the file on the console with cp works. So the syyntax should be fine. Also the command producing the following error is fine
=> ERROR [3/7] RUN /root/.local/bin/uv pip install -r /opt/netbox/plugin_requirements.txt
uv can be found in that directory. Also copying the .txt file to that location before running docker compose does not change something.
Any hint to solve would be cool
Thanks