Public Repository

Last pushed: 2 years ago
Short Description
Ubuntu 14.04.2 LTS / Apache karaf 4.0.1 (Oracle Java 1.8.0_60)
Full Description

Ubuntu 14.04.2 LTS / Apache karaf 4.0.1 (Oracle Java 1.8.0_60)

Dockerfile

FROM keks/java-base
MAINTAINER Jan M. <keks@keksfabrik.eu>
# karaf from project site
ENV KARAF_VERSION=4.0.0

RUN wget http://www.eu.apache.org/dist/karaf/${KARAF_VERSION}/apache-karaf-${KARAF_VERSION}.tar.gz && \
    mkdir /opt/karaf && \
    tar --strip-components=1 -C /opt/karaf -xzf apache-karaf-${KARAF_VERSION}.tar.gz && \
    rm apache-karaf-${KARAF_VERSION}.tar.gz && \
    sed -i 's/^\(felix\.fileinstall\.dir\s*=\s*\).*$/\1\/deploy/' /opt/karaf/etc/org.apache.felix.fileinstall-deploy.cfg

EXPOSE 1099 8101 44444
ENTRYPOINT ["/opt/karaf/bin/karaf"]
VOLUME ["/deploy", "/data"]
RUN adduser --system --group --gecos "karaf user" karaf && \
    chown -R karaf:karaf /opt/karaf
#By default, all Apache Karaf files are "gather" in one directory: the KARAF_HOME.
#You can define your own directory layout, by using some Karaf environment variables:
#ENV KARAF_HOME=
#KARAF_DATA is the location of the data folder, where Karaf stores temporary files.
#ENV KARAF_DATA=
#KARAF_ETC is the location of the etc folder, where Karaf stores configuration files.
#ENV KARAF_ETC=
#KARAF_BASE is the Karaf base folder. By default KARAF_BASE is the same as KARAF_HOME
#ENV KARAF_BASE=
USER karaf

After install from the karaf project site a user is added (with a low userid like it would be generated when installing a service - makes mounting folders easier since the user and group will be identical across all my docker images and i only have to chown messagebus:fuse), the /deploy folder is generated and the entrypoint is set to karaf. The install is made to /opt/karaf and $JAVA_HOME is already set in the base image.
The /deploy folder is meant for OSGi bundles and /data is meant as a convenient way to store logs and configuration files on the host system (could mount /opt/karaf/etc, /opt/karaf/data and /opt/karaf/deploy instead)

there's also older versions tagged 3.0.3 & 3.0.4

Docker Pull Command
Owner
keks

Comments (0)