-
Notifications
You must be signed in to change notification settings - Fork 111
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
feat: docker container #203
base: main
Are you sure you want to change the base?
Conversation
@willcrichton please let me know what you think 👍🏻 |
&& apt install -y rustup curl wget gcc git nginx \ | ||
&& chown -R ubuntu /opt/rust-book | ||
|
||
USER ubuntu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why run all these commands as ubuntu
rather than root
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly just to be the same uid as when the container runs and file permissions are thus properly set
&& mdbook-quiz --version \ | ||
&& mdbook-aquascope --version | ||
|
||
RUN echo \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the echo \
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Readability, this way all commands line up nicely (personal preference)
Thanks @harmw! It's great to have a Docker build for people who want the latest version. Fwiw, for people who just want an offline version of the book, it's probably simpler to just clone the latest build:
But it's nice to have a Docker image too. |
Wait, how come I never noticed that branch 🤦🏼♂️ that completely negates the purpose of having Docker (which is super awesome). Gonna check that branch, and maybe add it to README in a pr 👍🏻
|
@willcrichton did a quick check and running from gh-pages throws errors in safari; mainly |
@harmw you will need to serve the book through a local file server rather than a python3 -m http.server &
open http://localhost:8000 |
This puts the entire book in a✈️
docker
container, which is useful for those wanting to start their Rust journey in moments of limited to no internet connectivityIt also makes it possible to start learning (with the book) without needing to build this project first, which on my Mac was quite the trouble.
It builds on
amd64
, seemsaarch64
is not possible (yet) as some of the required dependencies are not available in the required target architecture.Minor note: I'm not using
depot
butvolta
to manage the nodejs stuff, as I found that to be simpler and closer to home.