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

Docker image references "static" dir, doesnt exist? #18

Closed
erulabs opened this issue Jun 7, 2022 · 2 comments
Closed

Docker image references "static" dir, doesnt exist? #18

erulabs opened this issue Jun 7, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@erulabs
Copy link

erulabs commented Jun 7, 2022

Hello!

Project looks great! I'm building a Kubernetes one-click installer for microbin for https://pibox.io - but ran into an issue. When building the image for ARM64 (or any arch), I fail to copy /usr/src/microbin/static https://github.com/szabodanika/microbin/blob/master/Dockerfile#L23

It looks like that directory has been renamed "templates" in 4cc7377

Is the fix as easy as changing the line to:

COPY --from=builder /usr/src/microbin/templates /usr/local/bin/templates 

I'll test this now, but figured you might want to know about it! ❤️

@szabodanika
Copy link
Owner

Hi @erulabs, thanks for letting me know about this! You are right, the static folder previously contained the water.css stylesheet, but that has been moved into an askama template so that there aren't any resources outside the binary itself. The folder simply doesn't need to be copied over now, so that line can actually be safely deleted from the dockerfile.

@szabodanika szabodanika added the bug Something isn't working label Jun 7, 2022
@szabodanika szabodanika self-assigned this Jun 7, 2022
@szabodanika
Copy link
Owner

szabodanika commented Jun 7, 2022

Just an FYI if you're interested, this is how the water.css file is served now, and how other static resources will be served in the future:

https://github.com/szabodanika/microbin/blob/master/src/endpoints/static_resources.rs

This allows me to contain all the resources in the binary and have complete control over how they're served as well.

I will update the Dockerfile soon and if it works fine, I'll push the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants