uptime-kuma
uptime-kuma copied to clipboard
Create my own docker image from my fork
⚠️ Please verify that this bug has NOT been raised before.
- [X] I checked and didn't find similar issue
🛡️ Security Policy
- [X] I agree to have read this project Security Policy
📝 Describe your problem
Hello, I made a fork of your monitoring system I would like to make a docker image of my fork how is this possible? Thank you for your help.
🐻 Uptime-Kuma Version
Lastest Custom
💻 Operating System and Arch
Ubuntu 22.04 LTS (GNU/Linux 5.15.0-41-generic x86_64)
🌐 Browser
Microsoft Edge
🐋 Docker Version
Latest
🟩 NodeJS Version
Latest
If you go to the /docker directory of the repository, you'll find a dockerfile
.
From there, you can run docker build
to build out the docker image, and then run it like every other image 😄
If you go to the /docker directory of the repository, you'll find a
dockerfile
. From there, you can rundocker build
to build out the docker image, and then run it like every other image 😄
Please check these commands:
https://github.com/louislam/uptime-kuma/blob/df7f0b078db12c011286389ae1867f8aa2d8f095/package.json#L33-L37
it doesn't help me much..
it doesn't help me much..
Didn't see these, try npm run build-docker
or yarn build-docker
.
Hi,
i've been trying to build docker image locally. after solving lot of issues I ended up here
Do we have any procedure or docs for this?
Can someone help me here?
Hi, i've been trying to build docker image locally. after solving lot of issues I ended up here
Do we have any procedure or docs for this?
Can someone help me here?
You need to set the environment variable VERSION
.
Alternatively, you can edit package.json
and change the name louislam/uptime-kuma:$VERSION
to whatever you want.
Hi @louislam,
I was able to create the docker image in my local system by updating the package.json with
"build-docker-debian": "node ./extra/env2arg.js docker buildx build -f docker/dockerfile --platform linux/amd64 -t kuma/uptime-kuma . --load"
I checked the container to see my changes and changes were present But there is one problem, my changes are not reflecting when i access the website. Could you provide some help??
Hi @CreaCloudz, I was finally able to figure out. How to built a docker image in my local system.
Solution:
- Run
npm run build-dist-and-restart
which builds the dist(if dist folder is already present you have to delete it first and run this command). - Stop the running process(CTRL+C) after the dist folder is created with all the files or when the console shows Listening on PORT 3001
- Next Comment from line 24 to the end in the docker/dockerfile (why? because I don't have permission to upload to github the artifacts) and save it.
- Update
build-docker-debian
command in package.json to"build-docker-debian": "node ./extra/env2arg.js docker buildx build -f docker/dockerfile --platform linux/amd64 -t kuma/uptime-kuma . --load"
(this is for windows for others you have to update the platform tag). - Now run
npm run build-docker-debian
it creates the docker image with our changes. - Next you can run the command that creates the container
docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma kuma/uptime-kuma
voilà there you have it.🥳
@louislam Please comment if there were any mistakes
@satyamsettyeswara 's hack worked for me, but it seems like there should be a simpler way.
@Joseph94m I do think the same. after a while i was able to deduce the commands to this
Solution:
- Comment from line 24 to the end in the docker/dockerfile (why? because we don't have permission to upload to github the artifacts) and save it.
- Add new command to your package.json file
command:
"build-myimage": "npm run build && node ./extra/env2arg.js docker buildx build -f docker/dockerfile --platform linux/amd64 -t kuma/uptime-kuma . --load"
package.json should look like this - Next run this command to create you own image
npm run build-myimage
/cheers
We are clearing up our old issues and your ticket has been open for 3 months with no activity. Remove stale label or comment or this will be closed in 2 days.
This issue was closed because it has been stalled for 2 days with no activity.