Last active
November 3, 2016 19:21
-
-
Save gastaldi/e800130930041671ad5610b0e9f048cb to your computer and use it in GitHub Desktop.
Dockerfile to create a CentOS machine with the latest WildFly Swarm sources
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CentOS 7 | |
# Maven 3.3.9 | |
FROM jboss/base-jdk:8 | |
MAINTAINER George Gastaldi (https://github.com/gastaldi) | |
# install wget and git | |
USER root | |
RUN yum install -y wget git | |
# get maven 3.3.9 | |
RUN wget --no-verbose -O /tmp/apache-maven-3.3.9.tar.gz http://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz | |
# verify checksum | |
RUN echo "516923b3955b6035ba6b0a5b031fbd8b /tmp/apache-maven-3.3.9.tar.gz" | md5sum -c | |
# install maven | |
RUN tar xzf /tmp/apache-maven-3.3.9.tar.gz -C /opt/ | |
RUN ln -s /opt/apache-maven-3.3.9 /opt/maven | |
RUN ln -s /opt/maven/bin/mvn /usr/local/bin | |
RUN rm -f /tmp/apache-maven-3.3.9.tar.gz | |
ENV MAVEN_HOME /opt/maven | |
# remove download archive files | |
RUN yum clean all | |
USER jboss | |
# Clone GIT repositories | |
RUN git clone https://github.com/wildfly-swarm/wildfly-swarm.git /opt/jboss/wildfly-swarm | |
RUN git clone https://github.com/wildfly-swarm/wildfly-swarm-examples.git /opt/jboss/wildfly-swarm-examples | |
CMD ["bash"] |
You can also clone the sources locally and use -v
instead.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To Build:
docker build . -t wf-swarm
To Run:
docker run -v ~/.m2:/opt/jboss/.m2 -p8000:8000 -it wf-swarm