rmetzger commented on a change in pull request #14346:
URL: https://github.com/apache/flink/pull/14346#discussion_r540870878
##########
File path: docs/deployment/resource-providers/standalone/docker.md
##########
@@ -590,11 +416,203 @@ docker service create \
taskmanager
```
-The *job artifacts* must be available in the *JobManager* container, as
outlined [here](#start-a-job-cluster).
+The *job artifacts* must be available in the *JobManager* container, as
outlined [here](#application-mode-on-docker).
See also [how to specify the JobManager
arguments](#jobmanager-additional-command-line-arguments) to pass them
to the `flink-jobmanager` container.
The example assumes that you run the swarm locally and expects the *job
artifacts* to be in `/host/path/to/job/artifacts`.
It also mounts the host path with the artifacts as a volume to the container's
path `/opt/flink/usrlib`.
{% top %}
+
+## Flink on Docker Reference
+
+### Image tags
+
+The [Flink Docker repository](https://hub.docker.com/_/flink/) is hosted on
Docker Hub and serves images of Flink version 1.2.1 and later.
+The source for these images can be found in the [Apache
flink-docker](https://github.com/apache/flink-docker) repository.
+
+Images for each supported combination of Flink and Scala versions are
available, and
+[tag aliases](https://hub.docker.com/_/flink?tab=tags) are provided for
convenience.
+
+For example, you can use the following aliases:
+
+* `flink:latest` → `flink:<latest-flink>-scala_<latest-scala>`
+* `flink:1.11` → `flink:1.11.<latest-flink-1.11>-scala_2.11`
+
+<span class="label label-info">Note</span> It is recommended to always use an
explicit version tag of the docker image that specifies both the needed Flink
and Scala
+versions (for example `flink:1.11-scala_2.12`).
+This will avoid some class conflicts that can occur if the Flink and/or Scala
versions used in the application are different
+from the versions provided by the docker image.
+
+<span class="label label-info">Note</span> Prior to Flink 1.5 version, Hadoop
dependencies were always bundled with Flink.
+You can see that certain tags include the version of Hadoop, e.g. (e.g.
`-hadoop28`).
+Beginning with Flink 1.5, image tags that omit the Hadoop version correspond
to Hadoop-free releases of Flink
+that do not include a bundled Hadoop distribution.
+
+
+### Passing configuration via environment variables
+
+When you run Flink image, you can also change its configuration options by
setting the environment variable `FLINK_PROPERTIES`:
+
+```sh
+FLINK_PROPERTIES="jobmanager.rpc.address: host
+taskmanager.numberOfTaskSlots: 3
+blob.server.port: 6124
+"
+docker run --env FLINK_PROPERTIES=${FLINK_PROPERTIES} flink:{% if
site.is_stable %}{{site.version}}-scala{{site.scala_version_suffix}}{% else
%}latest{% endif %} <jobmanager|standalone-job|taskmanager>
+```
+
+The [`jobmanager.rpc.address`]({% link deployment/config.md
%}#jobmanager-rpc-address) option must be configured, others are optional to
set.
+
+The environment variable `FLINK_PROPERTIES` should contain a list of Flink
cluster configuration options separated by new line,
+the same way as in the `flink-conf.yaml`. `FLINK_PROPERTIES` takes precedence
over configurations in `flink-conf.yaml`.
+
+### Provide custom configuration
+
+The configuration files (`flink-conf.yaml`, logging, hosts etc) are located in
the `/opt/flink/conf` directory in the Flink image.
+To provide a custom location for the Flink configuration files, you can
+
+* **either mount a volume** with the custom configuration files to this path
`/opt/flink/conf` when you run the Flink image:
+
+ ```sh
+ docker run \
+ --mount type=bind,src=/host/path/to/custom/conf,target=/opt/flink/conf
\
+ flink:{% if site.is_stable
%}{{site.version}}-scala{{site.scala_version_suffix}}{% else %}latest{% endif
%} <jobmanager|standalone-job|taskmanager>
+ ```
+
+* or add them to your **custom Flink image**, build and run it:
+
+ *Dockerfile*:
+
+ ```dockerfile
+ FROM flink
+ ADD /host/path/to/flink-conf.yaml /opt/flink/conf/flink-conf.yaml
+ ADD /host/path/to/log4j.properties /opt/flink/conf/log4j.properties
+ ```
+
+<span class="label label-warning">Warning!</span> The mounted volume must
contain all necessary configuration files.
+The `flink-conf.yaml` file must have write permission so that the Docker entry
point script can modify it in certain cases.
+
+### Using filesystem plugins
+
+As described in the [plugins]({% link deployment/filesystems/plugins.md %})
documentation page: in order to use plugins they must be
+copied to the correct location in the Flink installation in the Docker
container for them to work.
+
+If you want to enable plugins provided with Flink (in the `opt/` directory of
the Flink distribution), you can pass the environment variable
`ENABLE_BUILT_IN_PLUGINS` when you run the Flink image.
+The `ENABLE_BUILT_IN_PLUGINS` should contain a list of plugin jar file names
separated by `;`. A valid plugin name is for example
`flink-s3-fs-hadoop-{{site.version}}.jar`
+
+```sh
+ docker run \
+ --env ENABLE_BUILT_IN_PLUGINS=flink-plugin1.jar;flink-plugin2.jar \
+ flink:{% if site.is_stable
%}{{site.version}}-scala{{site.scala_version_suffix}}{% else %}latest{% endif
%} <jobmanager|standalone-job|taskmanager>
+```
+
+There are also more [advanced ways](#advanced-customization) for customizing
the Flink image.
+
+### Enabling Python
Review comment:
Will this PR also get opened against Flink?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]