Docker, image and Wildfly


I am running a docker project today.
My goal is to package this in an image and push to dockerhub, but I am facing problems.

my docker-compose.yml-file consists of
image: mysql:5.6
env_file: .env

build: ./wildfly-custom

The mysql with a sql-file creates the database, database = mymedia

The wildfly-custom directory contains.
Dockerfile with FROM jboss/wildfly:8.2.1.Final + customization/configuration (jdbc-jar + eclipse-jar + a datasource )

The war-file which i deploy to wildfly through a Makefile uses the mymedia-database.
this works and the order of things is important.
the database needs to be up and running so that my wildfly-datarsource can be created ( JNDI-names points to the database ).
if I forget to start the database before i start wildfly , the wildfly-datasource cannot be created.

Now I would like to create an image and push that image to dockerhub.
the image should contain my customization/configuration + the war file.

The question could be a wildfly-question, could I creata a ds without the database beeing present ?
data-source add --name=MedDS
–user-name=mediaserver \
–check-valid-connection-sql=“SELECT 1”

or is there another way ?