Creating custom image from local installation

Hi all,
I am a complete newbie to dockre and i am captivated by its possiblities…
i was trying to create a new image from my local jboss wildfly installation,
but i am unsure on how to proceed with that, i surely dont want it to be based on the docker/wildfly image.
i want my own configurations on it.
can i tar it up and import as a docker image ?
how should this be made possible ?

I had tried to tar and import my existing wildfly folder, though the image was created i was getting error while running the image.
“Error response from daemon: could not find command”

should i try creating a dockerfile from scratch but while i build the same it was breaking on RUN with

somethign like dockerfile added below

FROM scratch

RUN tar xf ./wildfly.tar \

     && mv wildfly  /opt/jboss/wildfly 


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

any help would be much appreciated