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:start : ulimit option not configurable #484

Closed
alexist opened this issue Jun 14, 2016 · 5 comments
Closed

docker:start : ulimit option not configurable #484

alexist opened this issue Jun 14, 2016 · 5 comments

Comments

@alexist
Copy link
Contributor

alexist commented Jun 14, 2016

Hello,
In order to start my container, i have to set the option "--ulimit" in the command line :
"docker run --ulimit memlock=-1:-1 ....."

I checked the docker-maven-plugin documentation and the source code, but didn't see anything related to this.

It would be nice if plugin can manage this.

@rhuss
Copy link
Collaborator

rhuss commented Jun 28, 2016

You are right, this is currently not supported but would be a nice addition. If you feel fancy, PRs are always welcome ;-) If not no problem, we can implement it in a later release.

Just in case, let me know whether you are interested, I could give you the proper pointers (it's an easy one).

@alexist
Copy link
Contributor Author

alexist commented Jun 29, 2016

Hi,

Yes i'd like to contribute a PR on this subject

2016-06-28 17:07 GMT+02:00 Roland Huß [email protected]:

You are right, this is currently not supported but would be a nice
addition. If you feel fancy, PRs are always welcome ;-) If not no problem,
we can implement it in a later release.

Just in case, let me know whether you are interested, I could give you the
proper pointers (it's an easy one).


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#484 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAxkzezNdPulQMrhwcknrQcNWS6EWw5wks5qQTi3gaJpZM4I1X-h
.

@rhuss
Copy link
Collaborator

rhuss commented Jun 29, 2016

Great !

You'd best start at RunImageConfiguration which holds the configuration for <run> elements. There I would introduce a List property, e.g. List<ULimitConfig> ulimits where ULimitConfig would be a new Object with properties name, soft and hard. These translate then to the config as described here.

At the end it should be possible to specify ulimits within <run> like

<run>
   <ulimits>
      <ulimit>
         <name>memlock</name>
         <hard>-1</hard>
         <soft>-1</soft>
      </ulimit>
      ....
   </ulimits>
   ....
</run>

At lease one of <hard> or <soft> should be provided. You can have a look how the other run options are evaluated.

When you are doing the PR, it would be awesome if you could

  • Provide a Unit-Test (when its not too hard)
  • Update the documentation in doc/manual/docker-start.md
  • Add the possibility to add these options also for the PropertyConfigHandler

Don't hesitate to ask, if something is not clear ;-)

Thanks again, we love pull requests ;-)

alexist added a commit to alexist/docker-maven-plugin that referenced this issue Jul 6, 2016
@alexist alexist mentioned this issue Jul 7, 2016
@alexist
Copy link
Contributor Author

alexist commented Jul 7, 2016

Hello,
I have created the PR #507
Tell me if anything is wrong

rhuss added a commit that referenced this issue Jul 20, 2016
* Formatted documentation
* Added some more mtests
* Added to sample project some ulimits
* Removed builder in favor of direct instantiation
* Renamed "ULimit" to "Ulimit"

This relates to the PR #507.
@rhuss
Copy link
Collaborator

rhuss commented Jul 20, 2016

Thanks a lot ! It will be available in the next release.

@rhuss rhuss closed this as completed Jul 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants