-
Notifications
You must be signed in to change notification settings - Fork 2k
Dockerify #3292
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
Dockerify #3292
Conversation
* Sets up client * Starts the setup of the database machines
@@ -0,0 +1,18 @@ | |||
FROM resin:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm reading in the Docker docs that
Each
FROM
instruction clears any state created by previous instructions.
Does that mean FROM
is basically single inheritance? If yes, then how would I declare multiple dependencies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and you cannot; instead, you chain the inheritance. I have not yet seen a need for multiple inheritance, but if we have one we can probably just tackle it via having some redundant installs in docker images (not great, but not terrible).
ADD Source/ /gemini/Source | ||
ADD build.xml /gemini/ | ||
ADD ivy.xml /gemini/ | ||
ADD ivysettings.xml /gemini/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is copying files in TFB into the docker container, right? Would something like ADD ./ impl
also work, if the goal was to copy everything in the framework's directory into the container? I'm thinking it would be nice to be able to copy and paste this part from framework to framework without worrying about individual files like we are here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should work. I was trying to keep things clean for my POC.
|
||
EXPOSE 8080 | ||
|
||
CMD ["resinctl", "-conf", "/gemini/Docroot/WEB-INF/resin.xml", "console"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is our general guideline for when to use RUN
or CMD
? Is it: Use RUN
for every bash shell command involved in setup except the last one, and use CMD
for the last bash command that launches the server?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RUN
is only used for setup; it will not actually run and persist a process. See this comment for an example.
CMD
is what is executed when we start the container. This version does not execute a shell, but it could have just as well been CMD resin -conf /gemini/Docroot/WEB-INF/resin.xml console
and that would have invoked /bin/sh resin -conf ...
(the reaper will clean this either way. For instances where we need to run multiple processes (like PHP using php-fpm
and nginx
) we should be able to get away with CMD php-fpm ... && nginx ...
Woo, LGTM and start building out the rest! |
Switches the suite to using Docker. Initially this breaks everything except
gemini
andgemini-mysql
which were used as proofs of concept.Addresses #1, #2, #3, #4, #5, #6, #8, #9, #10, #11, #15, #16, #17, #18