Skip to content

Instantly share code, notes, and snippets.

@gastaldi
Last active November 3, 2016 19:21
Show Gist options
  • Save gastaldi/e800130930041671ad5610b0e9f048cb to your computer and use it in GitHub Desktop.
Save gastaldi/e800130930041671ad5610b0e9f048cb to your computer and use it in GitHub Desktop.
Dockerfile to create a CentOS machine with the latest WildFly Swarm sources
# 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"]
@gastaldi
Copy link
Author

gastaldi commented Nov 3, 2016

To Build: docker build . -t wf-swarm
To Run: docker run -v ~/.m2:/opt/jboss/.m2 -p8000:8000 -it wf-swarm

@gastaldi
Copy link
Author

gastaldi commented Nov 3, 2016

@gastaldi
Copy link
Author

gastaldi commented Nov 3, 2016

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