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

Offer a minimal binary Docker image for users #21

Open
cpcitor opened this issue Dec 10, 2019 · 0 comments
Open

Offer a minimal binary Docker image for users #21

cpcitor opened this issue Dec 10, 2019 · 0 comments

Comments

@cpcitor
Copy link
Owner

cpcitor commented Dec 10, 2019

Situation

Currently, cpc-dev-tool-chain works in a local Linux environment.

Shortcoming

  • MacOS is untested
  • Windows users are mostly left for a cygwin experience
  • git clone is short but initial compilation is somehow long

Direction for improvement

  • Docker would allow to satisfy all users (of an operating system that can run Docker).

What would make a good solution?

Thanks to RedBug (@Kyuran) for triggering this.

Sketch of user experience

# enter a cpc development dedicated directory, either empty or with some source code
# e.g.
mkdir cpc-dev
cd cpc-dev
# (optional) get some source code
git clone https://github.com/cpcitor/color-flood-for-amstrad-cpc
# enter container
docker run -v ${PWD}:/src/ -it cpc-dev-tool-chain
# or get source code from it inside docker
root@7d6f7fbafce9:/src# git clone https://github.com/cpcitor/color-flood-for-amstrad-cpc
(...)
root@7d6f7fbafce9:/src# cd color-flood-for-amstrad-cpc/
root@7d6f7fbafce9:/src/color-flood-for-amstrad-cpc# make dsk
(...)
# dsk is reachable from outside docker

In principle the container can run graphical apps, but in practice it works in Linux with some security concerns, does not work in Windows (without unusual software installation), Mac OS similar. In my dreams the Docker container would expose a web server that server an emulator (can be any language, in a webassembly component) that automatically runs the generated dsk.

No bloat

For best user experience, it would be very nice to publish a minimal Docker image that contain only the installed binaries of the needed tools, no unnecessary download, no trace of temporary files.

Additional information

Multi-stage process visible https://medium.com/@chemidy/create-the-smallest-and-secured-golang-docker-image-based-on-scratch-4752223b7324 but we won't do exactly that because we need a shell, make, etc, even at "run" (user) time.

Could take inspiration from https://dzone.com/articles/minideb-a-minimalist-debian-based-docker-image. Unsure whether to use bitnami's https://github.com/bitnami/minideb or debootstrap (I am familiar and actually used it in the past to test cpc-dev-tool-chain in a chroot).

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

No branches or pull requests

1 participant