Maven on Alpine OpenJDK8
Image on docker hub: https://hub.docker.com/r/pengbai/docker-mvn-j8-alpine/
This is a maven image, we can use maven command on running this image:
Pull image:
docker pull pengbai/docker-mvn-j8-alpine
Run mvn -version
command with container, this container will be then on STATUS Exited after excuting this command, look container's logs (docker logs CONTAINER_ID
) for more detail:
docker run -d pengbai/docker-mvn-j8-alpine:3.3.9 mvn -version
The same to run other maven command THIS_IS_A_MVN_COMMAND, you can also use volume to mount source on local /local-workspace.
docker run -d -v /local-workspace:/container-workspace pengbai/docker-mvn-j8-alpine:3.3.9 THIS_IS_A_MVN_COMMAND