For Openshift: How can I create a docker image based on Wildfly?
This is the Dockerfile is used:
FROM openshift/wildfly-101-centos7
# Install example app on wildfy
COPY target/ROOT.war /opt/wildfly/standalone/deployments/
# Default Startup by Wildfly, so no CMD needed.
# Expose ports we are interested in. Via the run I can use these
EXPOSE 8080 443
# CMD - use the default wildfly start command
After pushing the image, openshift gives the error:
This is an S2I WildFly v10.1.0 Final centos base image responsible for consuming a JEE project and deploying it onto WildFly application server. To use it, install S2I: https://github.com/openshift/source-to-image .
Should I use another image? The jboss/wildfly?
This is what I did to create, tag and push the image.
- Mvn clean install --- to create the ROOT.war
- docker build -t project/application .
- docker tag project/application registry.etc.com
- docker push registry.etc.com
- oc new-app mynewapplication
Q2: How can I publish the 8080 port ... or is this done by Openshift?