Docker builds are failing
See original GitHub issue⚠️ Please verify that this bug has NOT been raised before.
- I checked and didn’t find similar issue
🛡️ Security Policy
- I agree to have read this project Security Policy
Description
When I build app using Dockerfile, it does not work correctly.
> docker build -t kuma -f docker/dockerfile .
tar: dist: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
The command '/bin/sh -c cd /app && tar -zcvf $DIST dist' returned a non-zero code: 2
> docker build -t kuma -f docker/debian-base.dockerfile .
No platform??
The command '/bin/sh -c node ./extra/download-cloudflared.js $TARGETPLATFORM && dpkg --add-architecture arm && apt update && apt --yes --no-install-recommends install ./cloudflared.deb && rm -rf /var/lib/apt/lists/* && rm -f cloudflared.deb && apt --yes autoremove' returned a non-zero code: 1
👟 Reproduction steps
> docker build -t kuma -f docker/dockerfile .
> docker build -t kuma -f docker/debian-base.dockerfile .
### 👀 Expected behavior
Docker containers build correctly
### 😓 Actual Behavior
Build fails
### 🐻 Uptime-Kuma Version
master / last commit 27dbc02
### 💻 Operating System and Arch
Linux
### 🌐 Browser
not relevant
### 🐋 Docker Version
20.10
### 🟩 NodeJS Version
from container
### 📝 Relevant log output
```shell
> docker build -t kuma -f docker/dockerfile .
tar: dist: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
The command '/bin/sh -c cd /app && tar -zcvf $DIST dist' returned a non-zero code: 2
> docker build -t kuma -f docker/debian-base.dockerfile .
No platform??
The command '/bin/sh -c node ./extra/download-cloudflared.js $TARGETPLATFORM && dpkg --add-architecture arm && apt update && apt --yes --no-install-recommends install ./cloudflared.deb && rm -rf /var/lib/apt/lists/* && rm -f cloudflared.deb && apt --yes autoremove' returned a non-zero code: 1
Issue Analytics
- State:
- Created a year ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
How to debug build failures - Docker Community Forums
I've written a guide on how to debug docker builds like that. In short, look at the container ID of the failed step,...
Read more >How to debug Docker build failures - /admcpr
When a docker build is failing for me I find that a great way to understand what's causing the failure is to jump...
Read more >Docker : image build failed - Stack Overflow
Paths in a Dockerfile are always relative to the the context directory. The context directory is the positional argument passed to docker ......
Read more >debugging a failed docker build (intermediate) anthony ...
today we talk about two techniques for debugging a failed docker build !- how does docker work? https://youtu.be/tWvQAxkMaWsplaylist: ...
Read more >SOLVED: Docker build “Could not resolve 'archive.ubuntu ...
Its possible that the network connection for docker isn't connected and this can lead to weird Sometimes the internet connection for docker wont...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I am struggling with the same. @fluential did you figured out how to build locally?
Currently, the dockerfile is designed for me to release to Docker Hub and undocumented.
You probably need to build the
distfirst. Please checkbuild-dockerinpackage.jsonhttps://github.com/louislam/uptime-kuma/blob/master/package.json