Docker Community Forums

Share and learn in the Docker community.

Azure Ubuntu Dockerfile does not work

(Gladiator67) #1

In eclipse ide, I build the docker image which be deployed on azure vm with using my custom dockerfile below. As you know, the default virtual machine is Ubuntu 16 when generating docker image with docker file in eclipse ide. But the deployments keep failed. Below is my dockerfile for Ubuntu,

FROM ubuntu:latest

MAINTAINER Joseph Hwang <>

# Execute system update
RUN apt-get update -y

RUN apt-get -y install openjdk-8-jdk

ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64

# Install packages necessary to run EAP
RUN apt-get -y install xmlstarlet bsdtar unzip curl

ENV WILDFLY_HOME /opt/jboss/wildfly

ADD /opt/jboss/wildfly

RUN cd /opt/jboss/wildfly \
    && unzip \
    && mv wildfly-11.0.0.Final /opt/jboss/wildfly \
    && rm
RUN mkdir -p /opt/jboss/wildfly/modules/system/layers/base/com/mysql/main
ADD module.xml /opt/jboss/wildfly/modules/system/layers/base/com/mysql/main/
ADD mysql-connector-java-5.1.46-bin.jar /opt/jboss/wildfly/modules/system/layers/base/com/mysql/main/
ADD standalone.xml /opt/jboss/wildfly/standalone/configuration/

ADD C:/eclipse-workspace/Test/Test.war /opt/jboss/wildfly/standalone/deployments/Test.war
#ADD Test.war.deployed $WILDFLY_HOME/standalone/deployments/

VOLUME ["/var/lib/wildfly"] 

WORKDIR /data/wildfly 


CMD ["/opt/jboss/wildfly/bin/", "-b", ""]

I have no idea what codes brings the error. In centos 7, some modified this dockerfile codes work well and generate docker image and container. But in Ubuntu, not working. I am totally stuck here. Any reply will be deeply appreciated. Best regards