Docker Library Bot 7 rokov pred
rodič
commit
d5f7039b41
4 zmenil súbory, kde vykonal 53 pridanie a 22 odobranie
  1. 43 12
      maven/README.md
  2. 6 6
      node/README.md
  3. 2 2
      orientdb/README.md
  4. 2 2
      swipl/README.md

+ 43 - 12
maven/README.md

@@ -79,30 +79,61 @@ WARNING:
 
 
 # How to use this image
 # How to use this image
 
 
-## Create a Dockerfile in your Maven project
+You can run a Maven project by using the Maven Docker image directly, passing a Maven command to `docker run`:
 
 
-```dockerfile
-FROM maven:3.2-jdk-7-onbuild
-CMD ["do-something-with-built-packages"]
+```console
+$ docker run -it --rm --name my-maven-project -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven maven:3.3-jdk-8 mvn clean install
+```
+
+## Building local Docker image (optional)
+
+This is a base image that you can extend, so it has the bare minimum packages needed. If you add custom package(s) to the `Dockerfile`, then you can build your local Docker image like this:
+
+```console
+$ docker build --tag my_local_maven:3.5.2-jdk-8 .
 ```
 ```
 
 
-Put this file in the root of your project, next to the pom.xml.
+# Reusing the Maven local repository
+
+The local Maven repository can be reused across containers by creating a volume and mounting it in `/root/.m2`.
 
 
-This image includes multiple ONBUILD triggers which should be all you need to bootstrap. The build will `COPY . /usr/src/app` and `RUN mvn install`.
+	docker volume create --name maven-repo
+	docker run -it -v maven-repo:/root/.m2 maven mvn archetype:generate # will download artifacts
+	docker run -it -v maven-repo:/root/.m2 maven mvn archetype:generate # will reuse downloaded artifacts
 
 
-You can then build and run the image:
+Or you can just use your home .m2 cache directory that you share e.g. with your Eclipse/IDEA:
 
 
 ```console
 ```console
-$ docker build -t my-maven .
-$ docker run -it --name my-maven-script my-maven
+$ docker run -it --rm -v "$PWD":/usr/src/mymaven -v "$HOME/.m2":/root/.m2 -v "$PWD/target:/usr/src/mymaven/target" -w /usr/src/mymaven maven mvn clean package  
+```
+
+# Packaging a local repository with the image
+
+The `$MAVEN_CONFIG` dir (default to `/root/.m2`) could be configured as a volume so anything copied there in a Dockerfile at build time is lost. For that reason the dir `/usr/share/maven/ref/` exists, and anything in that directory will be copied on container startup to `$MAVEN_CONFIG`.
+
+To create a pre-packaged repository, create a `pom.xml` with the dependencies you need and use this in your `Dockerfile`. `/usr/share/maven/ref/settings-docker.xml` is a settings file that changes the local repository to `/usr/share/maven/ref/repository`, but you can use your own settings file as long as it uses `/usr/share/maven/ref/repository` as local repo.
+
+```dockerfile
+COPY pom.xml /tmp/pom.xml
+RUN mvn -B -f /tmp/pom.xml -s /usr/share/maven/ref/settings-docker.xml dependency:resolve
+```
+
+To add your custom `settings.xml` file to the image use
+
+```dockerfile
+COPY settings.xml /usr/share/maven/ref/
 ```
 ```
 
 
-## Run a single Maven command
+For an example, check the `tests` dir
+
+# Running as non-root
+
+Maven needs the user home to download artifacts to, and if the user does not exist in the image an extra `user.home` Java property needs to be set.
 
 
-For many simple projects, you may find it inconvenient to write a complete `Dockerfile`. In such cases, you can run a Maven project by using the Maven Docker image directly, passing a Maven command to `docker run`:
+For example, to run as user `1000` mounting the host' Maven repo
 
 
 ```console
 ```console
-$ docker run -it --rm --name my-maven-project -v "$PWD":/usr/src/mymaven -w /usr/src/mymaven maven:3.2-jdk-7 mvn clean install
+$ docker run -v ~/.m2:/var/maven/.m2 -ti --rm -u 1000 -e MAVEN_CONFIG=/var/maven/.m2 maven mvn -Duser.home=/var/maven archetype:generate
 ```
 ```
 
 
 # Image Variants
 # Image Variants

+ 6 - 6
node/README.md

@@ -16,12 +16,12 @@ WARNING:
 
 
 # Supported tags and respective `Dockerfile` links
 # Supported tags and respective `Dockerfile` links
 
 
--	[`9.7.1`, `9.7`, `9`, `latest` (*9/Dockerfile*)](https://github.com/nodejs/docker-node/blob/8306bec7750d0574217e807957096186dcb9f12f/9/Dockerfile)
--	[`9.7.1-alpine`, `9.7-alpine`, `9-alpine`, `alpine` (*9/alpine/Dockerfile*)](https://github.com/nodejs/docker-node/blob/8306bec7750d0574217e807957096186dcb9f12f/9/alpine/Dockerfile)
--	[`9.7.1-onbuild`, `9.7-onbuild`, `9-onbuild`, `onbuild` (*9/onbuild/Dockerfile*)](https://github.com/nodejs/docker-node/blob/8306bec7750d0574217e807957096186dcb9f12f/9/onbuild/Dockerfile)
--	[`9.7.1-slim`, `9.7-slim`, `9-slim`, `slim` (*9/slim/Dockerfile*)](https://github.com/nodejs/docker-node/blob/8306bec7750d0574217e807957096186dcb9f12f/9/slim/Dockerfile)
--	[`9.7.1-stretch`, `9.7-stretch`, `9-stretch`, `stretch` (*9/stretch/Dockerfile*)](https://github.com/nodejs/docker-node/blob/8306bec7750d0574217e807957096186dcb9f12f/9/stretch/Dockerfile)
--	[`9.7.1-wheezy`, `9.7-wheezy`, `9-wheezy`, `wheezy` (*9/wheezy/Dockerfile*)](https://github.com/nodejs/docker-node/blob/8306bec7750d0574217e807957096186dcb9f12f/9/wheezy/Dockerfile)
+-	[`9.8.0`, `9.8`, `9`, `latest` (*9/Dockerfile*)](https://github.com/nodejs/docker-node/blob/7ce7ea44b56820b967bd6da71dbc3b977ec4c660/9/Dockerfile)
+-	[`9.8.0-alpine`, `9.8-alpine`, `9-alpine`, `alpine` (*9/alpine/Dockerfile*)](https://github.com/nodejs/docker-node/blob/7ce7ea44b56820b967bd6da71dbc3b977ec4c660/9/alpine/Dockerfile)
+-	[`9.8.0-onbuild`, `9.8-onbuild`, `9-onbuild`, `onbuild` (*9/onbuild/Dockerfile*)](https://github.com/nodejs/docker-node/blob/7ce7ea44b56820b967bd6da71dbc3b977ec4c660/9/onbuild/Dockerfile)
+-	[`9.8.0-slim`, `9.8-slim`, `9-slim`, `slim` (*9/slim/Dockerfile*)](https://github.com/nodejs/docker-node/blob/7ce7ea44b56820b967bd6da71dbc3b977ec4c660/9/slim/Dockerfile)
+-	[`9.8.0-stretch`, `9.8-stretch`, `9-stretch`, `stretch` (*9/stretch/Dockerfile*)](https://github.com/nodejs/docker-node/blob/7ce7ea44b56820b967bd6da71dbc3b977ec4c660/9/stretch/Dockerfile)
+-	[`9.8.0-wheezy`, `9.8-wheezy`, `9-wheezy`, `wheezy` (*9/wheezy/Dockerfile*)](https://github.com/nodejs/docker-node/blob/7ce7ea44b56820b967bd6da71dbc3b977ec4c660/9/wheezy/Dockerfile)
 -	[`8.10.0`, `8.10`, `8`, `carbon` (*8/Dockerfile*)](https://github.com/nodejs/docker-node/blob/4c7763dc2cb067becf12ea4bd55e88b881ccba2b/8/Dockerfile)
 -	[`8.10.0`, `8.10`, `8`, `carbon` (*8/Dockerfile*)](https://github.com/nodejs/docker-node/blob/4c7763dc2cb067becf12ea4bd55e88b881ccba2b/8/Dockerfile)
 -	[`8.10.0-alpine`, `8.10-alpine`, `8-alpine`, `carbon-alpine` (*8/alpine/Dockerfile*)](https://github.com/nodejs/docker-node/blob/4c7763dc2cb067becf12ea4bd55e88b881ccba2b/8/alpine/Dockerfile)
 -	[`8.10.0-alpine`, `8.10-alpine`, `8-alpine`, `carbon-alpine` (*8/alpine/Dockerfile*)](https://github.com/nodejs/docker-node/blob/4c7763dc2cb067becf12ea4bd55e88b881ccba2b/8/alpine/Dockerfile)
 -	[`8.10.0-onbuild`, `8.10-onbuild`, `8-onbuild`, `carbon-onbuild` (*8/onbuild/Dockerfile*)](https://github.com/nodejs/docker-node/blob/4c7763dc2cb067becf12ea4bd55e88b881ccba2b/8/onbuild/Dockerfile)
 -	[`8.10.0-onbuild`, `8.10-onbuild`, `8-onbuild`, `carbon-onbuild` (*8/onbuild/Dockerfile*)](https://github.com/nodejs/docker-node/blob/4c7763dc2cb067becf12ea4bd55e88b881ccba2b/8/onbuild/Dockerfile)

+ 2 - 2
orientdb/README.md

@@ -18,8 +18,8 @@ WARNING:
 
 
 -	[`2.0.18` (*2.0/Dockerfile*)](https://github.com/orientechnologies/orientdb-docker/blob/8a9633c19fa9c53a5446b9b62997ff389813e785/2.0/Dockerfile)
 -	[`2.0.18` (*2.0/Dockerfile*)](https://github.com/orientechnologies/orientdb-docker/blob/8a9633c19fa9c53a5446b9b62997ff389813e785/2.0/Dockerfile)
 -	[`2.1.25` (*2.1/Dockerfile*)](https://github.com/orientechnologies/orientdb-docker/blob/8a9633c19fa9c53a5446b9b62997ff389813e785/2.1/Dockerfile)
 -	[`2.1.25` (*2.1/Dockerfile*)](https://github.com/orientechnologies/orientdb-docker/blob/8a9633c19fa9c53a5446b9b62997ff389813e785/2.1/Dockerfile)
--	[`2.2.32`, `latest` (*2.2/x86_64/alpine/Dockerfile*)](https://github.com/orientechnologies/orientdb-docker/blob/b364415996e2211f2704b8a1d1d3c7295585fc0e/2.2/x86_64/alpine/Dockerfile)
--	[`2.2.32-spatial` (*2.2-spatial/x86_64/alpine/Dockerfile*)](https://github.com/orientechnologies/orientdb-docker/blob/b364415996e2211f2704b8a1d1d3c7295585fc0e/2.2-spatial/x86_64/alpine/Dockerfile)
+-	[`2.2.33`, `latest` (*2.2/x86_64/alpine/Dockerfile*)](https://github.com/orientechnologies/orientdb-docker/blob/2e7da48cbf270ba82d26be8f334cd4e3ab2c79aa/2.2/x86_64/alpine/Dockerfile)
+-	[`2.2.33-spatial` (*2.2-spatial/x86_64/alpine/Dockerfile*)](https://github.com/orientechnologies/orientdb-docker/blob/2e7da48cbf270ba82d26be8f334cd4e3ab2c79aa/2.2-spatial/x86_64/alpine/Dockerfile)
 -	[`3.0.0RC2` (*3.0/x86_64/alpine/Dockerfile*)](https://github.com/orientechnologies/orientdb-docker/blob/122a4976eef7341c9c39f0050e41aec0468909a9/3.0/x86_64/alpine/Dockerfile)
 -	[`3.0.0RC2` (*3.0/x86_64/alpine/Dockerfile*)](https://github.com/orientechnologies/orientdb-docker/blob/122a4976eef7341c9c39f0050e41aec0468909a9/3.0/x86_64/alpine/Dockerfile)
 -	[`3.0.0RC2-spatial` (*3.0-spatial/x86_64/alpine/Dockerfile*)](https://github.com/orientechnologies/orientdb-docker/blob/122a4976eef7341c9c39f0050e41aec0468909a9/3.0-spatial/x86_64/alpine/Dockerfile)
 -	[`3.0.0RC2-spatial` (*3.0-spatial/x86_64/alpine/Dockerfile*)](https://github.com/orientechnologies/orientdb-docker/blob/122a4976eef7341c9c39f0050e41aec0468909a9/3.0-spatial/x86_64/alpine/Dockerfile)
 
 

+ 2 - 2
swipl/README.md

@@ -16,8 +16,8 @@ WARNING:
 
 
 # Supported tags and respective `Dockerfile` links
 # Supported tags and respective `Dockerfile` links
 
 
--	[`latest`, `7.7.9` (*7.7.9/stretch/Dockerfile*)](https://github.com/SWI-Prolog/docker-swipl/blob/49d87bcac8f23de646e70250a5e08c6dcf3c9208/7.7.9/stretch/Dockerfile)
--	[`stable`, `7.6.4` (*7.6.4/stretch/Dockerfile*)](https://github.com/SWI-Prolog/docker-swipl/blob/49d87bcac8f23de646e70250a5e08c6dcf3c9208/7.6.4/stretch/Dockerfile)
+-	[`latest`, `7.7.10` (*7.7.10/stretch/Dockerfile*)](https://github.com/SWI-Prolog/docker-swipl/blob/fec30af23c6f68f227bced29053bb45334893c6c/7.7.10/stretch/Dockerfile)
+-	[`stable`, `7.6.4` (*7.6.4/stretch/Dockerfile*)](https://github.com/SWI-Prolog/docker-swipl/blob/fec30af23c6f68f227bced29053bb45334893c6c/7.6.4/stretch/Dockerfile)
 
 
 # Quick reference
 # Quick reference