# ESB base fuse image FROM centos:7 # Fuse 7.2 works fine, while 7.3 or 7.3.1 fails # ENV FUSE_VERSION 7.2.0.fuse-720035-redhat-00001 # ENV FUSE_VERSION 7.3.0.fuse-730079-redhat-00001 ENV FUSE_VERSION 7.3.1.fuse-731003-redhat-00003 ENV FUSE_BASE /usr/local/fuse/7.3.0 ENV FUSE_INSTALL_DIR $FUSE_BASE/fuse-root ENV JBOSS_FUSE_DIR $FUSE_INSTALL_DIR/fuse-karaf-$FUSE_VERSION ENV ADMIN_PASSWORD admin # User root user to install software USER root # Install packages necessary to run EAP # RUN yum update -y && yum -y install xmlstarlet saxon augeas bsdtar unzip net-tools bind-utils # Install OpenJDK 1.8 RUN yum -y install java-1.8.0-openjdk-headless-1.8.0.191.b12-1.el7_6.x86_64 && \ yum -y install java-1.8.0-openjdk-devel-1.8.0.191.b12-1.el7_6.x86_64 && \ yum -y install java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64 && \ yum -y install unzip && \ yum clean all # Set the JAVA_HOME variable to make it clear where Java is located ENV JAVA_HOME /usr/lib/jvm/jre # Create a user and group used to launch processes # The user ID 1000 is the default for the first "regular" user on Fedora/RHEL, # so there is a high chance that this ID will be equal to the current user # making it easier to use volumes (no permission issues) RUN groupadd -r fuse -g 1000 && useradd -u 1000 -r -g fuse -m -d /usr/local/fuse -s /sbin/nologin -c "Fuse user" fuse && \ chmod 755 /usr/local/fuse RUN echo "*************" && echo "FUSE_VERSION=$FUSE_VERSION, FUSE_BASE=$FUSE_BASE, FUSE_INSTALL_DIR=$FUSE_INSTALL_DIR, JBOSS_FUSE_DIR=$JBOSS_FUSE_DIR" && echo "****************" # Set the working directory to fuse's user home directory WORKDIR $FUSE_BASE # Install Fuse USER root RUN mkdir -p $FUSE_INSTALL_DIR RUN chown -R fuse:fuse $FUSE_INSTALL_DIR USER fuse #COPY fuse-karaf-$FUSE_VERSION.zip $FUSE_INSTALL_DIR/fuse-karaf.zip COPY fuse-karaf-$FUSE_VERSION.zip $FUSE_INSTALL_DIR/fuse-karaf.zip WORKDIR $FUSE_INSTALL_DIR RUN unzip -q fuse-karaf.zip -d $FUSE_INSTALL_DIR && rm *.zip # Fuse config WORKDIR $JBOSS_FUSE_DIR RUN sed -i -e 's/^#admin = admin/admin = '"$ADMIN_PASSWORD"'/' \ -e 's/^#_g_/_g_/' etc/users.properties RUN echo 'export JAVA_HOME='"$JAVA_HOME"' ' >> bin/setenv # bin/client && \ #RUN bin/fuse server & \ # The call to bin/client will fail # RUN bin/start && \ sleep 30 && \ echo "Calling bin/status" && \ bin/status && \ echo "Calling bin/client" && \ bin/client list && \ sleep 5 && \ echo "Calling bin/stop" && \ bin/stop CMD $JBOSS_FUSE_DIR/bin/fuse server # build the image using # docker build --rm -t test .