Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building the Dockerfile is not working #1

Open
nocomment-bln opened this issue Jun 11, 2023 · 6 comments
Open

Building the Dockerfile is not working #1

nocomment-bln opened this issue Jun 11, 2023 · 6 comments

Comments

@nocomment-bln
Copy link

Hello
I tried to get your Dockerfile running, but without success :(

Here is a little screen recording

Screen-Recording-2023-06-11-20-53-38.mp4

Any hints?

@SandiyosDev
Copy link
Owner

Could you try manually specifying the target platform during build? I still have to update the readme, but it's also seen in the error logs.
docker build --targetplatform='linux/amd64' -t uptime-kuma-tailscale-docker .
or
docker build --platform linux/amd64 -t uptime-kuma-tailscale-docker .

@nocomment-bln
Copy link
Author

Screenshot_2023-06-12_18 23 08s
doesnt work :(

@SandiyosDev
Copy link
Owner

Okay, then try this very basic version of the dockerfile, since you're building on a E5-2695, it should build fine.
Save it in the dockerfile and run the same build and run command and let me know if it works:

FROM tailscale/tailscale:stable as tailscale
FROM louislam/uptime-kuma:latest

RUN apt-get update && apt-get install -y ca-certificates iptables \
    && rm -rf /var/lib/apt/lists/*

COPY --from=tailscale /usr/local/bin/tailscaled /usr/local/bin/tailscaled
COPY --from=tailscale /usr/local/bin/tailscale /usr/local/bin/tailscale

RUN mkdir -p /var/run/tailscale /var/cache/tailscale /var/lib/tailscale

ENV TS_HOSTNAME=TailscaleUptimeKuma

EXPOSE 3001

VOLUME ["/app/data"]

HEALTHCHECK --interval=60s --timeout=30s --start-period=180s --retries=5 CMD curl --fail http://localhost:3001/healthcheck || exit 1

ENTRYPOINT ["/usr/bin/dumb-init", "--"]

CMD ["/bin/sh", "-c", "/usr/local/bin/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/var/run/tailscale/tailscaled.sock & /usr/local/bin/tailscale up --authkey=$TS_AUTHKEY --accept-routes --hostname=$TS_HOSTNAME & node server/server.js"]

@nocomment-bln
Copy link
Author

hi again,
Building worked out fine!

I had to active Tailscale manually via the url in the log.

I cannot access the uptime-kuma frontend via the Tailscale ip only via the local one. Any idea?

@nocomment-bln
Copy link
Author

Okay, I can not reach the frontend but i can ping Tailscale ip addresses which is nice!

@SandiyosDev
Copy link
Owner

SandiyosDev commented Jun 20, 2023

Okay, I can not reach the frontend but i can ping Tailscale ip addresses which is nice!

Hey, sorry for the late reply.
The frontend should be reachable at port 3001, visit localhost:3001 on your browser to double check, if that does not work, post your logs here and I can help take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants