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

Docker image? #64

Closed
ali-ramadhan opened this issue Jul 15, 2019 · 8 comments · Fixed by #69
Closed

Docker image? #64

ali-ramadhan opened this issue Jul 15, 2019 · 8 comments · Fixed by #69
Assignees

Comments

@ali-ramadhan
Copy link
Member

Might be good to develop stuff in a docker image (super far future goal).

Some useful stuff:

@ali-ramadhan ali-ramadhan transferred this issue from project-lovelace/lovelace-website Jul 18, 2019
@ali-ramadhan
Copy link
Member Author

ali-ramadhan commented Jul 19, 2019

We might want a multi-stage build with maybe ubuntu, nginx, django, etc. images? Or maybe just ubuntu and nginx then we do all the python stuff we want on top?

https://docs.docker.com/develop/develop-images/multistage-build/

@ali-ramadhan
Copy link
Member Author

We might want one docker image for lovelace-engine and another for lovelace-website

@ali-ramadhan
Copy link
Member Author

The lovelace-engine docker image can install LXD and configure the Arch Linux lovelace-image from scratch.

@ali-ramadhan ali-ramadhan transferred this issue from another repository Jul 31, 2019
@ali-ramadhan
Copy link
Member Author

Hmmm, for the website itself having two docker images probably makes sense: one for nginx, one for Django.

@benallan
Copy link
Contributor

benallan commented Sep 8, 2019

I'd say the code runner in docker-engine might need to be dealt with before this, since we can get that working using a single docker container (the code runner container). To dockerise the engine itself and the website it'll be a bit more complicated:

  • Containers inside containers, for the code runner "inside" the engine container.
  • Networking between the website and engine containers.

@benallan
Copy link
Contributor

benallan commented Sep 8, 2019

So there would be probably need to be at least three containers:

  • Docker website
  • Docker engine
  • Code runner (called from engine)

That's the minimum to start with, but the db and others could also be separated into different containers too. For the images, you could use whichever is handiest. Docker will pull and cache the intermediate images it uses when building a custom one, so e.g. if you base a dockerfile on an ubuntu:1804 image your local docker images will include the ubuntu image, plus the new image you've built based on ubuntu.

@benallan benallan self-assigned this Sep 8, 2019
@benallan
Copy link
Contributor

benallan commented Sep 8, 2019

Is there any reason that you were looking at arch as a base for some of the images? Maybe it's easier to install LXC on arch?

@ali-ramadhan
Copy link
Member Author

Hmmm, yeah not clear to me the best way of Dockerizing the website. I guess I felt having 3+ Docker containers running at once seemed like a lot, but maybe it's normal to run with 10+ containers in real world applications. But I guess it makes the most sense if there's one container per task/app?

Is there any reason that you were looking at arch as a base for some of the images? Maybe it's easier to install LXC on arch?

Ah woops sorry I think I replied to this elsewhere by mistake. Not sure if this is a good reason but since it's a rolling release distro I can easily install the latest versions of Python, Julia, node.js, etc. but maybe this is easy with something like Debian unstable if they have a Docker image (might be a more stable image too?).

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 a pull request may close this issue.

2 participants