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

Add XDK Dockerfile #90

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Add XDK Dockerfile #90

wants to merge 2 commits into from

Conversation

thegridman
Copy link
Contributor

Added a Dockerfile to run the xdk in a container. This is obviously work-in-progress while we decide exactly how we work in containers, but it is a starting point for anyone to try it out.

To build the image

First build the XDK

grade clean build

The build the image

cd xdk
docker build -t ghcr.io/xtclang/xdk:latest .

Run the XDK in a Container

To run the image

docker run -it --rm ghcr.io/xtclang/xdk:latest

This will run the image interactively and drop you into a shell. All the XDK executables are on the path, as is Java and Node.
There was no point doing anything more as the default entry point, as there is nothing to run.

The XDK is installed under the /xqiz.it directory.

Notes

The image is currently fixed to use Java 17.0.2. It also install Node 18.17.1 as that is what the image from https://github.com/azzazzel/xtc_platform uses. Eventually all these would ideally be parameterised.

I could have done the whole build of the XDK inside the first part of the Dockerfile too but most people right now will already be building locally and this way you get whatever you have just built in the image.

Copy link
Contributor

@lagergren lagergren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work on both aarch64 and x86 mac and linux respectively for me. Is it a good idea to maybe check in a .dockerignore file too?

Having an extension of this also building the xdk can come later but that can be useful I think. And also staging this and the ui container together with buildah/docker compose. But this is a good start! Maybe document the build and run commands, or maybe you did but I'm on the subway with my cell and might have missed it.

Feel free to correct the "grade" not "gradle" typo left in the master README.md

@lagergren lagergren marked this pull request as draft March 4, 2024 08:32
@lagergren
Copy link
Contributor

Converting this to draft. The world has changed quite a lot since this PR was put up, and I hope to finish the dockerization of the Platform this week. Then we can sync and decide what needs to be added to Dockerize the XDK.

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

Successfully merging this pull request may close these issues.

2 participants