-
Notifications
You must be signed in to change notification settings - Fork 4
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
Dockerization via fabric8 plugin #50
Conversation
vtelensky
commented
Mar 6, 2019
- Basic dockerization via fabric8 plugin
…lume of host file system to path provided in box.home
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 purpose of src/main/resources/boxes/f25/f25_1_virtualbox.box
file? I don't like it.
pom.xml
Outdated
<plugin> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>docker-maven-plugin</artifactId> | ||
<version>0.28.0</version> |
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.
could you please extract all version string to variables https://github.com/sparkoo/boxitory/blob/devel/pom.xml#L66
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.
Done
Is it all and working? I would welcome some doc as I'd like to try it myself :) |
…nd boxes.name properties to pom.xml. Remving volume from DockerFile.
I have created very minimalistic configuration of docker image. Please see README.md and try to run it. It will need some more upgrades to be more configurable similarly as via application.properties. I will create different task for that. |
… file (server.port property), comment to box.home property, tweaking .gitignore
I have added ability to read application.properties file and use server.port value for exposing container port the same as it is setup in properties file. Setting up application behaviour via properties file is a bit tricky for containerized apps. It should be done differently eg. via environment vars specified by --env param of docker command. Env vars are lately passed to some shell script which is starting app via jar file. It is usual way in those kind of scenarios. We can discuss later on some beer. |
What is intended usage of docker image? I'd like to build an image and the run it instead of running |
If ^^^ is intended usage, I'm satisfied with that. It just needs to be documented. |
There are several ways how to use it. The way which you have explained is also possible. The thing is that by your way you are running image directly via docker command and you are utilize mvn plugin fabric8 only for building the image. By running |
I have setup that the host path to boxes and container path to boxes are the same. For the time being I've set it up as /tmp/boxes. Can be changed. Try to run in via mvn plugin and we can discuss how to resolve this. |
I'm not sure about latest changes. I would reduce requirements to two cases:
|
<!--suppress UnresolvedMavenProperty --> | ||
<volume>${app.properties.path}:${box.container.home}/application.properties</volume> | ||
<!--suppress UnresolvedMavenProperty --> | ||
<volume>${app.logs}:${box.container.home}/logs</volume> |
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.
Build is not failing at my local neither. Travis complains about logs dir. Shouldn't this line be without /logs
? Same as on line 218
where also isn't /boxes
directory.
I've run build locally and it built docker image when just doing |
I've disabled fabric8 plugin executions during all the maven phases. You can still use the plugin by commands I've documented. |
thaanks! created boxitory image on dockerhub https://cloud.docker.com/u/sparkoo/repository/docker/sparkoo/boxitory 🐳 |