No need to install with devcontainer+GitHub codespaces

Problems installing on other platforms
Post Reply
Fabrizio
Member
Posts: 120
Joined: Tue Jul 11, 2017 9:28 pm

No need to install with devcontainer+GitHub codespaces

Post by Fabrizio »

Hi!

Will there ever be a devcontainer container?

A devcontainer can also be used with any free GitHub account with codespaces (https://github.com/features/codespaces) even the free version (with a monthly time limit) in order to automatically build a container that you can run on a browser. No need to install anything.

You can see how the whole Cross-Lib framework (including z88dk, cc65, cmoc, gcc, several tools, python, Makefile, perl, java, etc.) can be used without any need to install anything except a running browser and a GitHub account:
https://github.com/Fabrizio-Caruso/CROSS-LIB

As a side effect I can run z88dk in a browser together with Cross-Lib.
Obviously it would be better to just have a devcontainer for z88dk alone for the people that do not need Cross-Lib.

Fabrizio

P.S.:
This is possible thanks to the work of Alex Thissen:
https://github.com/Fabrizio-Caruso/CROS ... vcontainer

In order to do the same thing for the z88dk repository you only need a Dockerfile to build the container (done automatically by codespaces) and a devcontainer.json to set up the devcontainer (+ a devcontainer.env file with some environment variables).
User avatar
dom
Well known member
Posts: 2291
Joined: Sun Jul 15, 2007 10:01 pm

Re: No need to install with devcontainer+GitHub codespaces

Post by dom »

I do like devcontainers and use them a lot for the paying job.

From experiments, a small trim down of the one in your repo would work, however instinctively I don't like having two different Dockerfiles in a single repo, and any devcontainer variant does need active maintenance - eg to handle the minimum OS dependencies of the vscode tools.
Fabrizio
Member
Posts: 120
Joined: Tue Jul 11, 2017 9:28 pm

Re: No need to install with devcontainer+GitHub codespaces

Post by Fabrizio »

Hi @dom!

Thanks for your reply!

You know Docker and devcontainers better than me so I assume you must be right.
I just don't understand why you would need two separate Dockerfiles maybe because I only understand them superficially.
In my case I use the very same Dockerfile for the devcontainer as well as for a locally hosted Docker image/container.

I understand is that for the case of z88dk, a local installation either through docker or through a the build script is not so painful as what I do with Cross-Lib with many more dependencies.

Regards

Fabrizio
User avatar
dom
Well known member
Posts: 2291
Joined: Sun Jul 15, 2007 10:01 pm

Re: No need to install with devcontainer+GitHub codespaces

Post by dom »

The current docker file is based on alpine, so is a bit more difficult to add extra tools to - it probably makes for a more comfortable environment to use something else. They could be one file but I genuinely don't know how the existing container is being used so it's difficult to change.
User avatar
dom
Well known member
Posts: 2291
Joined: Sun Jul 15, 2007 10:01 pm

Re: No need to install with devcontainer+GitHub codespaces

Post by dom »

Just to circle back on this. I've created another repo which has an example of how to use the existing published docker image to build your own devcontainer for projects.

The example project is of course hello world, but it's been setup (using the multitarget makefile) to build for over 130 targets.

Anyway, I hope it's useful for someone in the future.
Fabrizio
Member
Posts: 120
Joined: Tue Jul 11, 2017 9:28 pm

Re: No need to install with devcontainer+GitHub codespaces

Post by Fabrizio »

Thanks a lot!
Post Reply