Shipping images can be painful
docker pull goldmann/wildfly
117mb download with Fedora images cached locally
It's even worse if you don't have a registry
docker export 6f91f81c9293 > wildfly.tar
Creates 1.7G fileUse the latest base image
No need to:
apt-get update
yum update
Unless you know how an images is built, you shouldn't trust it
Dockerfiles show how the images is built:
FROM fedora
RUN yum install -y wildfly
EXPOSE 8080
ENTRYPOINT ["/usr/share/wildfly/bin/launch.sh"]
FROM fedora
Downloads the latest fedora image from the docker indexRUN yum install -y wildfly
Downloads the Wildfly 8 bits from the fedora repoEXPOSE 8080
Exposes port 8080 from the container ENTRYPOINT ["/usr/share/wildfly/bin/launch.sh]
Sets the default executable to run FROM fedora
RUN yum install -y wildfly
EXPOSE 8080
ENTRYPOINT ["/usr/share/wildfly/bin/launch.sh"]
Build it:docker build -t wildfly8 .
Run it:docker run wildfly8