-
Notifications
You must be signed in to change notification settings - Fork 160
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
Update use of Docker #153
Update use of Docker #153
Conversation
Some questions:
Is there any advantage to the larger dockerfile? |
The handling of environment variables makes the edit-compile-test loop much more convenient: I don't have to type
I found that the current Limbo requirements pull in a bunch of native code -- and thus package dependencies. For example, when I try to build a Docker image given the simple Dockerfile provided above, I get the following error:
When I first got started, I tried for a while to find all the right Alpine packages to get Limbo to build, but was having trouble. I decided to switch to Ubuntu -- which I know better -- and got it going pretty quick. As you can see, I needed to pull in a fair number of dependencies to get things to work. Does someone else have a better set of base dependencies (base image plus native packages) for Limbo than what I found?
There's two parts of the Dockerfile, the base dependencies which in my file is everything above
I want to let developers use Docker for their inner "edit-compile-test" loop. This means the Docker building process needs to be fast. The problem with I could've done something like:
In fact, this what the file looked like for a while as I was developing. But this also blew the cache too many times for changes that didn't matter to the Limbo build (e.g., changes to |
Being possible to test in the production docker container can be an acceptable thing.
While people change code, they can change requirements also. Re-running this should always be mandatory if there are changes.
There is an ongoing pull request to support just using a config file with all the variables (see #146 ). |
In Limbo, the contents of Limbo is so small, I don't think it makes sense to separate it's dev and prod requirements, but if that's the direction we want to go, that effort should be a separate task. (There should probably be a
The Docker file I submitted takes care of this automatically: if |
Closed in favor of #154 |
Limbo's use of Docker has become a bit stale. This pull request contains a refresh.
The goal of the use of Docker in this PR is two-fold:
Minimize the dev environment required for Limbo. In particular, developers only need Git and Docker on their laptop: with this patch, everything needed to build, test, and run Limbo is done inside Docker containers. This minimized dev environment is great for teaching environments, where misconfigured laptops don't waste the time of students, professors or TAs. Also, developers new to Limbo might start by using the Dockerized build and testing, avoiding problems associated with setting up a dev environment until they've become somewhat proficient at Limbo development.
Produce a Limbo Docker image that can be used for cloud deployments of Limbo (whether on Amazon, Google, Microsoft, or some private cloud).
This PR uses Docker Compose to drive Docker. Compose is a layer on top of Docker that moves what used to be a crazy number of command-line arguments to
docker
into Docker Compose configuration files. Docker Compose files have become a de facto standard input to container orchestration systems, as they are accepted by Kubernetes, Elastic Container Service, and Mesos, as well as by Docker Swarm.This PR includes changes to
.travis.yml
for testing of the new Docker code. In particular, we use Travis build stages to run the Dockerized build-and-test if (and only if) the full Limbo "test matrix" successfully passes.