-
-
Notifications
You must be signed in to change notification settings - Fork 268
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
Add dockerised development environment helper #50
base: main
Are you sure you want to change the base?
Conversation
@@ -9,3 +9,6 @@ fw/BUILD/ | |||
fw/.mbedignore | |||
|
|||
/bazel-* | |||
|
|||
.DS_Store |
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.
This probably deserve reordering
@@ -0,0 +1,16 @@ | |||
FROM 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.
This should be pinned down a smidge more tightly
|
||
RUN apt-get update | ||
RUN apt-get install -y python3-pep517 python3-can python3-serial python3-setuptools python3-pyelftools python3-qtpy python3-wheel libtinfo5 | ||
RUN apt-get install -y curl patch git |
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.
These deps should be on a single line
RUN apt-get install -y python3-pep517 python3-can python3-serial python3-setuptools python3-pyelftools python3-qtpy python3-wheel libtinfo5 | ||
RUN apt-get install -y curl patch git | ||
|
||
# RUN addgroup --gid $GROUP_ID user |
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.
I believe this is required for Linux to avoid leaving root turds around the place.
I'm not entirely sure off the bat how best do deal with the differences in OSx vs. Linux on this one.
Additionally, I think there's some potential Windows complications too, but I'm less familiar with them.
For OSx specifically, enabling the option "Use Rosetta for x86/amd64 emulation on Apple Silicon" should vastly improve performance. | ||
|
||
|
||
## Usage |
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.
TODO write usage instructions
|
||
mkdir -p "$CACHE_DIR" | ||
|
||
docker build -t myimage \ |
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.
This shouldn't be naming it something (at least as trivial as myimage
), and should instead reference the freshly built image via it's tag.
Likely convert this to docker build -q
, though I will miss the output in case of failures.
Why?
I found it difficult to get started developing moteus firmware.
I want to make it easier on not just myself, but those who come after me to make improvements to this awesome project :)
How?
This adds a simple docker container + script to trivially spin up an assured (native if available, else emulated) x86_64 Ubuntu environment
Validation
Appears to work on my M1 Mac. Will need to verify a little more thoroughly though.