Skip to content

Instantly share code, notes, and snippets.

@vpavlin
Last active February 9, 2017 14:08
Show Gist options
  • Save vpavlin/2e77311d09da5ba4415a0803ae26143e to your computer and use it in GitHub Desktop.
Save vpavlin/2e77311d09da5ba4415a0803ae26143e to your computer and use it in GitHub Desktop.
FROM centos:7
MAINTAINER Vasek Pavlin <[email protected]>
VOLUME ['/target']
CMD ['/usr/bin/bash']
RUN mkdir -p /opt/obsidian &&\
chown 1000:1000 /opt/obsidian
WORKDIR /opt/obsidian
RUN yum -y install git java java-devel wget which &&\
yum clean all
#FIXME by using scl https://bugzilla.redhat.com/show_bug.cgi?id=1402447
RUN wget http://www.eu.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz &&\
tar xzf apache-maven-3.3.9-bin.tar.gz &&\
mkdir /usr/local/maven &&\
mv apache-maven-3.3.9/ /usr/local/maven/ &&\
alternatives --install /usr/bin/mvn mvn /usr/local/maven/apache-maven-3.3.9/bin/mvn 1 &&\
alternatives --set mvn /usr/local/maven/apache-maven-3.3.9/bin/mvn
ENV JAVA_HOME /usr/lib/jvm/java-openjdk
RUN mkdir -p /home/forge &&\
groupadd -r forge && useradd -r -g forge forge -d /home/forge &&\
chown forge:forge /home/forge
USER forge
RUN ls /usr/lib/jvm/
RUN git clone https://github.com/obsidian-toaster/obsidian-addon/ &&\
cd obsidian-addon &&\
mvn clean install
COPY . /opt/obsidian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment