question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

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:closed
  • Created a year ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
reigiocommented, Jul 14, 2022

I am struggling with the same. @fluential did you figured out how to build locally?

2reactions
louislamcommented, Jul 5, 2022

Currently, the dockerfile is designed for me to release to Docker Hub and undocumented.

You probably need to build the dist first. Please check build-docker in package.json https://github.com/louislam/uptime-kuma/blob/master/package.json

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found