lancaster-university / microbit-v2-samples

CODAL build tools and sample programs for the micro:bit v2.x
MIT License
64 stars 83 forks source link

Add Dockerfile and usage instructions #11

Closed incognitojam closed 3 years ago

incognitojam commented 3 years ago

I saw the issue about the missing Dockerfile so decided to add one 😄

Closes #7

finneyj commented 3 years ago

Thanks @IncognitoJam!

This is great - many thanks. Patch and docs look good to me.

@microbit-carlos I think you're our resident docker-meister... Any thoughts here before I merge in?

finneyj commented 3 years ago

Any thoughts on @microbit-carlos' comments above @IncognitoJam ?

incognitojam commented 3 years ago

Sorry been super busy with coursework! Just testing the changes out now

incognitojam commented 3 years ago

The image is still huge at 2.5GB, so it might be best to look at switching the base image to alpine at some point in the future.

microbit-carlos commented 3 years ago

This image based on Ubuntu bionic is about 1GB and also contains yotta: https://github.com/carlosperate/docker-microbit-toolchain If you like you can have a look to check what might be the main differences and see if the image can be reduced. Maybe the Arm packaged gcc-arm-none-eabi is smaller than the debian packaged version?

Apart from that the Dockerfile looks good 👍

incognitojam commented 3 years ago

Turns out the package used in docker-microbit-toolchain isn't available in the PPA anymore since bionic, but you can download an archive from the ARM website so we can copy the binaries into the image ourselves. The image size is down to 817MB now

microbit-carlos commented 3 years ago

Turns out the package used in docker-microbit-toolchain isn't available in the PPA anymore since bionic,

Yeah sorry, I should have mentioned that is why that dockerfile uses bionic instead of anything newer.

but you can download an archive from the ARM website so we can copy the binaries into the image ourselves.

Does Arm guarantee those URLs will work forever? If you have downgraded the Ubuntu image to bionic it might be better to install this via the Arm PPA? Even if it's no longer maintained, I assume it's more likely it'll still be around in the future?

incognitojam commented 3 years ago

Ok so if we just use bionic and the PPA, the image size is down to 633MB

finneyj commented 3 years ago

Great - thanks for the work @IncognitoJam @microbit-carlos!