Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/rydnr/.dockerfile-maven-plugin.rt
- Owner: rydnr
- Created: 2014-12-01T18:39:17.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-09T06:45:19.000Z (over 9 years ago)
- Last Synced: 2024-11-06T09:09:27.351Z (about 2 months ago)
- Language: Java
- Size: 434 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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/sudoersRUN 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.localVOLUME /home/
EXPOSE 8080
>>
```