[GH-ISSUE #3156] How can i build the docker image? #2139

Closed
opened 2026-02-26 07:34:11 +03:00 by kerem · 1 comment
Owner

Originally created by @balves42 on GitHub (Aug 24, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3156

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • N/A
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug
Instead of fetching the image i was trying to build it on my raspberry pi 4 but i have an error message. I don't know if i am missing something due to lack of experience building images directly or if some folder is missing

Nginx Proxy Manager Version
2.10.4

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repository
  2. cd into folder
  3. run docker build . -f ./docker/Dockerfile
  4. error Step 12/20 : COPY frontend/dist /app/frontend COPY failed: file not found in build context or excluded by .dockerignore: stat frontend/dist: file does not exist appears

Expected behavior
Image built locally

Operating System
Debian GNU/Linux 11 (bullseye)

Additional context

Sending build context to Docker daemon  16.04MB
Step 1/20 : FROM jc21/nginx-full:certbot-node
 ---> ace8ddf65c8b
Step 2/20 : ARG TARGETPLATFORM
 ---> Using cache
 ---> 8dd3dfe39228
Step 3/20 : ARG BUILD_VERSION
 ---> Using cache
 ---> b5a5e1fd3357
Step 4/20 : ARG BUILD_COMMIT
 ---> Using cache
 ---> 47e653b95ffb
Step 5/20 : ARG BUILD_DATE
 ---> Using cache
 ---> 1fc8f88f7eef
Step 6/20 : ENV SUPPRESS_NO_CONFIG_WARNING=1 	S6_BEHAVIOUR_IF_STAGE2_FAILS=1 	S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 	S6_FIX_ATTRS_HIDDEN=1 	S6_KILL_FINISH_MAXTIME=10000 	S6_VERBOSITY=1 	NODE_ENV=production 	NPM_BUILD_VERSION="${BUILD_VERSION}" 	NPM_BUILD_COMMIT="${BUILD_COMMIT}" 	NPM_BUILD_DATE="${BUILD_DATE}"
 ---> Running in e8d0b88b06cc
Removing intermediate container e8d0b88b06cc
 ---> 403bf6b91723
Step 7/20 : RUN echo "fs.file-max = 65535" > /etc/sysctl.conf 	&& apt-get update 	&& apt-get install -y --no-install-recommends jq logrotate 	&& apt-get clean 	&& rm -rf /var/lib/apt/lists/*
 ---> Running in 111c2a4bd030
Get:1 http://deb.debian.org/debian buster InRelease [122 kB]
Get:2 https://deb.nodesource.com/node_16.x buster InRelease [4584 B]
Get:3 http://deb.debian.org/debian-security buster/updates InRelease [34.8 kB]
Get:4 http://deb.debian.org/debian buster-updates InRelease [56.6 kB]
Get:5 https://deb.nodesource.com/node_16.x buster/main arm64 Packages [778 B]
Get:6 http://deb.debian.org/debian buster/main arm64 Packages [7737 kB]
Get:7 http://deb.debian.org/debian-security buster/updates/main arm64 Packages [543 kB]
Get:8 http://deb.debian.org/debian buster-updates/main arm64 Packages [8780 B]
Fetched 8507 kB in 3s (2643 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
jq is already the newest version (1.5+dfsg-2+b1).
The following additional packages will be installed:
  cron libpopt0 sensible-utils
Suggested packages:
  anacron checksecurity
Recommended packages:
  default-mta | mail-transport-agent bsd-mailx | mailx
The following NEW packages will be installed:
  cron libpopt0 logrotate sensible-utils
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 222 kB of archives.
After this operation, 693 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main arm64 sensible-utils all 0.0.12 [15.8 kB]
Get:2 http://deb.debian.org/debian buster/main arm64 cron arm64 3.0pl1-134+deb10u1 [98.0 kB]
Get:3 http://deb.debian.org/debian buster/main arm64 libpopt0 arm64 1.16-12 [48.3 kB]
Get:4 http://deb.debian.org/debian buster/main arm64 logrotate arm64 3.14.0-4 [60.1 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 222 kB in 0s (733 kB/s)
Selecting previously unselected package sensible-utils.
(Reading database ... 20270 files and directories currently installed.)
Preparing to unpack .../sensible-utils_0.0.12_all.deb ...
Unpacking sensible-utils (0.0.12) ...
Selecting previously unselected package cron.
Preparing to unpack .../cron_3.0pl1-134+deb10u1_arm64.deb ...
Unpacking cron (3.0pl1-134+deb10u1) ...
Selecting previously unselected package libpopt0:arm64.
Preparing to unpack .../libpopt0_1.16-12_arm64.deb ...
Unpacking libpopt0:arm64 (1.16-12) ...
Selecting previously unselected package logrotate.
Preparing to unpack .../logrotate_3.14.0-4_arm64.deb ...
Unpacking logrotate (3.14.0-4) ...
Setting up sensible-utils (0.0.12) ...
Setting up libpopt0:arm64 (1.16-12) ...
Setting up cron (3.0pl1-134+deb10u1) ...
Adding group `crontab' (GID 102) ...
Done.
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Setting up logrotate (3.14.0-4) ...
Processing triggers for libc-bin (2.28-10+deb10u2) ...
Processing triggers for mime-support (3.62) ...
Removing intermediate container 111c2a4bd030
 ---> f32e4b743696
Step 8/20 : COPY docker/scripts/install-s6 /tmp/install-s6
 ---> 905da6b91694
Step 9/20 : RUN /tmp/install-s6 "${TARGETPLATFORM}" && rm -f /tmp/install-s6
 ---> Running in e8bd10c83f9f
❯ Installing S6-overlay v3.1.5.0 for linux/amd64 (x86_64)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  6224  100  6224    0     0  10287      0 --:--:-- --:--:-- --:--:-- 10287
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  625k  100  625k    0     0   109k      0  0:00:05  0:00:05 --:--:--  143k
❯ S6-overlay install Complete
Removing intermediate container e8bd10c83f9f
 ---> 97d2b4a14214
Step 10/20 : EXPOSE 80 81 443
 ---> Running in 1d3b65cb6758
Removing intermediate container 1d3b65cb6758
 ---> 0aa33faa9ed9
Step 11/20 : COPY backend       /app
 ---> 81e027d48a1f
Step 12/20 : COPY frontend/dist /app/frontend
COPY failed: file not found in build context or excluded by .dockerignore: stat frontend/dist: file does not exist

Any help would be appreciated. Thank you

Originally created by @balves42 on GitHub (Aug 24, 2023). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3156 **Checklist** - Have you pulled and found the error with `jc21/nginx-proxy-manager:latest` docker image? - N/A - Are you sure you're not using someone else's docker image? - Yes - Have you searched for similar issues (both open and closed)? - Yes **Describe the bug** Instead of fetching the image i was trying to build it on my raspberry pi 4 but i have an error message. I don't know if i am missing something due to lack of experience building images directly or if some folder is missing **Nginx Proxy Manager Version** 2.10.4 **To Reproduce** Steps to reproduce the behavior: 1. Clone the repository 2. cd into folder 3. run `docker build . -f ./docker/Dockerfile` 4. error `Step 12/20 : COPY frontend/dist /app/frontend COPY failed: file not found in build context or excluded by .dockerignore: stat frontend/dist: file does not exist` appears **Expected behavior** Image built locally **Operating System** Debian GNU/Linux 11 (bullseye) **Additional context** ``` Sending build context to Docker daemon 16.04MB Step 1/20 : FROM jc21/nginx-full:certbot-node ---> ace8ddf65c8b Step 2/20 : ARG TARGETPLATFORM ---> Using cache ---> 8dd3dfe39228 Step 3/20 : ARG BUILD_VERSION ---> Using cache ---> b5a5e1fd3357 Step 4/20 : ARG BUILD_COMMIT ---> Using cache ---> 47e653b95ffb Step 5/20 : ARG BUILD_DATE ---> Using cache ---> 1fc8f88f7eef Step 6/20 : ENV SUPPRESS_NO_CONFIG_WARNING=1 S6_BEHAVIOUR_IF_STAGE2_FAILS=1 S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 S6_FIX_ATTRS_HIDDEN=1 S6_KILL_FINISH_MAXTIME=10000 S6_VERBOSITY=1 NODE_ENV=production NPM_BUILD_VERSION="${BUILD_VERSION}" NPM_BUILD_COMMIT="${BUILD_COMMIT}" NPM_BUILD_DATE="${BUILD_DATE}" ---> Running in e8d0b88b06cc Removing intermediate container e8d0b88b06cc ---> 403bf6b91723 Step 7/20 : RUN echo "fs.file-max = 65535" > /etc/sysctl.conf && apt-get update && apt-get install -y --no-install-recommends jq logrotate && apt-get clean && rm -rf /var/lib/apt/lists/* ---> Running in 111c2a4bd030 Get:1 http://deb.debian.org/debian buster InRelease [122 kB] Get:2 https://deb.nodesource.com/node_16.x buster InRelease [4584 B] Get:3 http://deb.debian.org/debian-security buster/updates InRelease [34.8 kB] Get:4 http://deb.debian.org/debian buster-updates InRelease [56.6 kB] Get:5 https://deb.nodesource.com/node_16.x buster/main arm64 Packages [778 B] Get:6 http://deb.debian.org/debian buster/main arm64 Packages [7737 kB] Get:7 http://deb.debian.org/debian-security buster/updates/main arm64 Packages [543 kB] Get:8 http://deb.debian.org/debian buster-updates/main arm64 Packages [8780 B] Fetched 8507 kB in 3s (2643 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... jq is already the newest version (1.5+dfsg-2+b1). The following additional packages will be installed: cron libpopt0 sensible-utils Suggested packages: anacron checksecurity Recommended packages: default-mta | mail-transport-agent bsd-mailx | mailx The following NEW packages will be installed: cron libpopt0 logrotate sensible-utils 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 222 kB of archives. After this operation, 693 kB of additional disk space will be used. Get:1 http://deb.debian.org/debian buster/main arm64 sensible-utils all 0.0.12 [15.8 kB] Get:2 http://deb.debian.org/debian buster/main arm64 cron arm64 3.0pl1-134+deb10u1 [98.0 kB] Get:3 http://deb.debian.org/debian buster/main arm64 libpopt0 arm64 1.16-12 [48.3 kB] Get:4 http://deb.debian.org/debian buster/main arm64 logrotate arm64 3.14.0-4 [60.1 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 222 kB in 0s (733 kB/s) Selecting previously unselected package sensible-utils. (Reading database ... 20270 files and directories currently installed.) Preparing to unpack .../sensible-utils_0.0.12_all.deb ... Unpacking sensible-utils (0.0.12) ... Selecting previously unselected package cron. Preparing to unpack .../cron_3.0pl1-134+deb10u1_arm64.deb ... Unpacking cron (3.0pl1-134+deb10u1) ... Selecting previously unselected package libpopt0:arm64. Preparing to unpack .../libpopt0_1.16-12_arm64.deb ... Unpacking libpopt0:arm64 (1.16-12) ... Selecting previously unselected package logrotate. Preparing to unpack .../logrotate_3.14.0-4_arm64.deb ... Unpacking logrotate (3.14.0-4) ... Setting up sensible-utils (0.0.12) ... Setting up libpopt0:arm64 (1.16-12) ... Setting up cron (3.0pl1-134+deb10u1) ... Adding group `crontab' (GID 102) ... Done. invoke-rc.d: could not determine current runlevel invoke-rc.d: policy-rc.d denied execution of start. Setting up logrotate (3.14.0-4) ... Processing triggers for libc-bin (2.28-10+deb10u2) ... Processing triggers for mime-support (3.62) ... Removing intermediate container 111c2a4bd030 ---> f32e4b743696 Step 8/20 : COPY docker/scripts/install-s6 /tmp/install-s6 ---> 905da6b91694 Step 9/20 : RUN /tmp/install-s6 "${TARGETPLATFORM}" && rm -f /tmp/install-s6 ---> Running in e8bd10c83f9f ❯ Installing S6-overlay v3.1.5.0 for linux/amd64 (x86_64) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 6224 100 6224 0 0 10287 0 --:--:-- --:--:-- --:--:-- 10287 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 625k 100 625k 0 0 109k 0 0:00:05 0:00:05 --:--:-- 143k ❯ S6-overlay install Complete Removing intermediate container e8bd10c83f9f ---> 97d2b4a14214 Step 10/20 : EXPOSE 80 81 443 ---> Running in 1d3b65cb6758 Removing intermediate container 1d3b65cb6758 ---> 0aa33faa9ed9 Step 11/20 : COPY backend /app ---> 81e027d48a1f Step 12/20 : COPY frontend/dist /app/frontend COPY failed: file not found in build context or excluded by .dockerignore: stat frontend/dist: file does not exist ``` Any help would be appreciated. Thank you
kerem 2026-02-26 07:34:11 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@balves42 commented on GitHub (Aug 25, 2023):

After searching a little bit more i read about the buildx and installed the necessary dependency.
I noticed my mistake about using "docker build" instead of "docker buildx" like the comments in the Dockerfile suggested.

The commands i ran are:

sudo apt-get update -y
sudo apt-get install docker-buildx-plugin
./scripts/ci/frontend-build
docker buildx build . -f ./docker/Dockerfile

Now i have the image built. Thank you anyway

<!-- gh-comment-id:1693241017 --> @balves42 commented on GitHub (Aug 25, 2023): After searching a little bit more i read about the buildx and installed the necessary dependency. I noticed my mistake about using "docker build" instead of "docker buildx" like the comments in the Dockerfile suggested. The commands i ran are: ```` sudo apt-get update -y sudo apt-get install docker-buildx-plugin ./scripts/ci/frontend-build docker buildx build . -f ./docker/Dockerfile ```` Now i have the image built. Thank you anyway
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#2139
No description provided.