Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rydnr/.dockerfile-maven-plugin.rt

RT variant of Dockerfile Maven Plugin repository
https://github.com/rydnr/.dockerfile-maven-plugin.rt

Last synced: 1 day ago
JSON representation

RT variant of Dockerfile Maven Plugin repository

Awesome Lists containing this project

README

        

dockerfile-maven-plugin
=======================

A Maven plugin to generate Dockerfiles based on templates.

= Usage =

== pom.xml ==

Add the following plugin declaration to your pom.xml:

```

[..]

org.acmsl
dockerfile-maven-plugin
latest-SNAPSHOT

${project.build.outputDirectory}/META-INF/
${project.basedir}/src/main/assembly/Dockerfile.stg


[..]

```

== Dockerfile.stg ==

Define your Dockerfile template.
You can use the following to customize yours:
```
group Dockerfile;

source(C) ::= <<

>>

dockerfile(C, pom) ::= <<

FROM acmsl/tomcat:201410
MAINTAINER
ENV HOME /root
USER root
# Create user
RUN groupadd
RUN useradd -s /bin/bash -g -G ,tomcat,sudo -m -c "User running /etc/init.d/" artifactory

# java-user can run tomcat app
RUN sed -i '/%sudo ALL=(ALL:ALL) ALL/a java-user localhost=NOPASSWD: /etc/init.d/ stop,/etc/init.d/ start,/etc/init.d/ restart,/sbin/services stop,/sbin/services start,/sbin/services restart' /etc/sudoers

RUN wget -O /opt/tomcat/webapps/-. http://my.artifactory/repo////-.
RUN mv /opt/tomcat/webapps/ROOT /opt/tomcat/webapps/welcome
RUN cd /home/ && /usr/lib/jvm/java/bin/jar -xvf /opt/tomcat/webapps/-.
RUN rm -rf /home/ && mv /home/- /home/
ADD context.xml /opt/tomcat/conf/Catalina/localhost/ROOT.xml
ADD .bashrc /home//.bashrc
RUN rm -rf /opt/tomcat/webapps/*
ADD config /etc/default/tomcat
RUN mkdir /etc/service/
RUN cd /etc/service/ && ln -s ../tomcat/run .
RUN cd /etc/service/ && ln -s tomcat
RUN cd /etc/init.d && ln -s tomcat
RUN update-rc.d defaults
RUN chown -R :tomcat /home/ /opt/tomcat/.
RUN chmod -R g+w /home/ /opt/tomcat/.
ADD rc.local /etc/rc.local
RUN chmod +x /etc/rc.local

VOLUME /home/

EXPOSE 8080
>>
```