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

Support RUN Command definition, through plugin configuration #191

Closed
javapapo opened this issue Jun 10, 2015 · 13 comments
Closed

Support RUN Command definition, through plugin configuration #191

javapapo opened this issue Jun 10, 2015 · 13 comments

Comments

@javapapo
Copy link

I would like to be able, to define one or more 'RUN' commands, when defining my <image> element. For example, in a case where I want to execute some jboss-cli script(s), I would like to have something like

<image>
        <alias>myService</alias>
                 <name>AName</name>
                             <build>
                                    <from>jboss/wildfly</from>
                                      <maintainer>javapapo@mac.com</maintainer>
                                       <assembly>
                                           <descriptor>assembly.xml</descriptor>
                                           <basedir>/opt/jboss/wildfly/standalone/deployments</basedir>
                                        </assembly>
                                        <ports>
                                            <port>8080</port>
                                            <port>9090</port>
                                        </ports>
                                    <runCommands>
                                      <runcmd>echo "Hello World"</runcmd>
                                       <runcmd>/opt/jboss/wildfly/bin/add-user.sh admin pass --silent</runcmd>
                              </runCommands>
       </build> 
... 

and in the generated dockerFile would look like.

FROM jboss/wildfly
MAINTAINER javapapo@mac.com
EXPOSE 8080 9090
RUN echo "Hello World"
RUN /opt/jboss/wildfly/bin/add-user.sh admin pass --silent

Many thanks for considering.

@rhuss
Copy link
Collaborator

rhuss commented Jun 13, 2015

Good point, shouldn't be hard to add (start at DockerFileBuilder). Are you on a PR ? If not, I can implement this (after integrating some other stuff first).

@javapapo
Copy link
Author

I will it give a try, yes I pulled master just yesterday!

@tnn
Copy link

tnn commented Jun 14, 2015

👍 Would be great with a RUN command. Let me know if I can help.

@rhuss
Copy link
Collaborator

rhuss commented Jun 15, 2015

The question of course is still, where to place the RUN commands: Before or after the ADD commands ? Probably after.

@javapapo
Copy link
Author

Hi, I have hacked an example most probably will push tomorrow, where I have the runCommands section after the ports section config. I need to see where you support ADD in the configuration.

@computerlyrik
Copy link
Contributor

+1 ... need some code review on your code?

rhuss/docker-maven-plugin@master...javapapo:feature/runCmds

@computerlyrik
Copy link
Contributor

Tested your code. Lacks some features from origin master.
I will try a merge tomorrow.

@computerlyrik computerlyrik mentioned this issue Jul 9, 2015
@computerlyrik
Copy link
Contributor

Merged 👍

@javapapo
Copy link
Author

javapapo commented Jul 9, 2015

Hello, sorry due to some work obligations I did not repost here - since I had not fully tested the change.

@javapapo
Copy link
Author

javapapo commented Jul 9, 2015

my feature is under feature/runCmds branch

@computerlyrik
Copy link
Contributor

@javapapo my pull request is about your code with a little modifications

Hopefully it gets accepted :)

@rhuss
Copy link
Collaborator

rhuss commented Jul 9, 2015

Thanks a lot, guys ! I will have a look at is ASAP and will integrate it ...

@javapapo
Copy link
Author

javapapo commented Jul 9, 2015

@computerlyrik thanks great! Still think maybe we should add a bit of more checks on the parsing of the command, will wait @rhuss comments :)

@rhuss rhuss closed this as completed in 6704387 Jul 17, 2015
leusonmario pushed a commit to leusonmario/docker-maven-plugin that referenced this issue Aug 18, 2018
…adme

added documentation to README.md for "forceTags" option.  Related to …
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

No branches or pull requests

4 participants