I wan´t to play around with Dockerfiles a bit. So I tried running Apache Nifi in Docker. I know that there is already a container available, this is for training purpose. I configured my Dockerfile as followed:
FROM openjdk:8-jre-alpine
COPY . /app
WORKDIR /app
EXPOSE 8080
CMD ["sh","nifi-1.9.0/bin/nifi.sh","start"]
Now this seems to work, but when I try to run the container with:
docker build --tag nifid .
docker run --name nifi-app -p 8080:8080 nifid
It seems to run but the port is neither exposed, nor can I reach the App via localhost:8080. Any suggestions on how to proceed? This is what docker ps --all shows me
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ccf75612d5ac nifid "sh nifi-1.9.0/bin/n…" 20 hours ago Exited (0) 20 hours ago nifi-app
I realize that the app was excited now. Anything wrong i the Dockerfile?
EDIT: The docker logs [Container ID] spitted following:
Java home: /usr/lib/jvm/java-1.8-openjdk/jre
NiFi home: /app/nifi-1.9.0
Bootstrap Config File: /app/nifi-1.9.0/conf/bootstrap.conf
EDIT: Found a nice "documentation" https://hub.docker.com/r/apache/nifi/dockerfile
A bit to indepth but it should to the job