Skip to content

Commit

Permalink
[FLINK-20632] Use Docker image published to apache/flink by default
Browse files Browse the repository at this point in the history
  • Loading branch information
rmetzger committed Jan 8, 2021
1 parent ed354d9 commit 03ca399
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<td><h5>kubernetes.container.image</h5></td>
<td style="word-wrap: break-word;">The default value depends on the actually running version. In general it looks like "flink:&lt;FLINK_VERSION&gt;-scala_&lt;SCALA_VERSION&gt;"</td>
<td>String</td>
<td>Image to use for Flink containers. The specified image must be based upon the same Apache Flink and Scala versions as used by the application. Visit https://hub.docker.com/_/flink?tab=tags for the images provided by the Flink project.</td>
<td>Image to use for Flink containers. The specified image must be based upon the same Apache Flink and Scala versions as used by the application. Visit https://hub.docker.com/_/flink?tab=tags for the official docker images provided by the Flink project. The Flink project also publishes docker images here: https://hub.docker.com/r/apache/flink</td>
</tr>
<tr>
<td><h5>kubernetes.container.image.pull-policy</h5></td>
Expand Down
12 changes: 11 additions & 1 deletion docs/deployment/resource-providers/standalone/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This *Getting Started* section guides you through the local setup (on one machin
### Introduction

[Docker](https://www.docker.com) is a popular container runtime.
There are Docker images for Apache Flink available [on Docker Hub](https://hub.docker.com/_/flink).
There are official Docker images for Apache Flink available [on Docker Hub](https://hub.docker.com/_/flink).
You can use the Docker images to deploy a *Session* or *Application cluster* on Docker. This page focuses on the setup of Flink on Docker, Docker Swarm and Docker Compose.

Deployment into managed containerized environments, such as [standalone Kubernetes]({% link deployment/resource-providers/standalone/kubernetes.md %}) or [native Kubernetes]({% link deployment/resource-providers/native_kubernetes.md %}), are described on separate pages.
Expand Down Expand Up @@ -210,6 +210,16 @@ Local deployment in the Session Mode has already been described in the [Getting
## Flink on Docker Reference
### Image hosting
There are two distribution channels for the Flink Docker images:
1. [Official Flink images on Docker Hub (reviewed and build by Docker)](https://hub.docker.com/_/flink/)
2. [Flink images on Docker Hub `apache/flink` (managed by the Flink developers)](https://hub.docker.com/r/apache/flink)
We recommend using the official images on Docker Hub, as they are reviewed by Docker. The images on `apache/flink` are provided in case of delays in the review process by Docker.
Launching an image named `flink:latest` will pull the latest image from Docker Hub. In order to use the images hosted in `apache/flink`, replace `flink` by `apache/flink`. Any of the image tags (starting from Flink 1.11.3) are avaialble on `apache/flink` as well.
### 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.
Expand Down
8 changes: 4 additions & 4 deletions docs/deployment/resource-providers/standalone/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ spec:
spec:
containers:
- name: jobmanager
image: flink:{% if site.is_stable %}{{site.version}}-scala{{site.scala_version_suffix}}{% else %}latest # The 'latest' tag contains the latest released version of Flink for a specific Scala version. Do not use the 'latest' tag in production as it will break your setup automatically when a new version is released.{% endif %}
image: apache/flink:{% if site.is_stable %}{{site.version}}-scala{{site.scala_version_suffix}}{% else %}latest # The 'latest' tag contains the latest released version of Flink for a specific Scala version. Do not use the 'latest' tag in production as it will break your setup automatically when a new version is released.{% endif %}
args: ["jobmanager"]
ports:
- containerPort: 6123
Expand Down Expand Up @@ -422,7 +422,7 @@ spec:
spec:
containers:
- name: taskmanager
image: flink:{% if site.is_stable %}{{site.version}}-scala{{site.scala_version_suffix}}{% else %}latest # The 'latest' tag contains the latest released version of Flink for a specific Scala version. Do not use the 'latest' tag in production as it will break your setup automatically when a new version is released.{% endif %}
image: apache/flink:{% if site.is_stable %}{{site.version}}-scala{{site.scala_version_suffix}}{% else %}latest # The 'latest' tag contains the latest released version of Flink for a specific Scala version. Do not use the 'latest' tag in production as it will break your setup automatically when a new version is released.{% endif %}
args: ["taskmanager"]
ports:
- containerPort: 6122
Expand Down Expand Up @@ -468,7 +468,7 @@ spec:
restartPolicy: OnFailure
containers:
- name: jobmanager
image: flink:{% if site.is_stable %}{{site.version}}-scala{{site.scala_version_suffix}}{% else %}latest # The 'latest' tag contains the latest released version of Flink for a specific Scala version. Do not use the 'latest' tag in production as it will break your setup automatically when a new version is released.{% endif %}
image: apache/flink:{% if site.is_stable %}{{site.version}}-scala{{site.scala_version_suffix}}{% else %}latest # The 'latest' tag contains the latest released version of Flink for a specific Scala version. Do not use the 'latest' tag in production as it will break your setup automatically when a new version is released.{% endif %}
env:
args: ["standalone-job", "--job-classname", "com.job.ClassName", <optional arguments>, <job arguments>] # optional arguments: ["--job-id", "<job id>", "--fromSavepoint", "/path/to/savepoint", "--allowNonRestoredState"]
ports:
Expand Down Expand Up @@ -524,7 +524,7 @@ spec:
spec:
containers:
- name: taskmanager
image: flink:{% if site.is_stable %}{{site.version}}-scala{{site.scala_version_suffix}}{% else %}latest # The 'latest' tag contains the latest released version of Flink for a specific Scala version. Do not use the 'latest' tag in production as it will break your setup automatically when a new version is released.{% endif %}
image: apache/flink:{% if site.is_stable %}{{site.version}}-scala{{site.scala_version_suffix}}{% else %}latest # The 'latest' tag contains the latest released version of Flink for a specific Scala version. Do not use the 'latest' tag in production as it will break your setup automatically when a new version is released.{% endif %}
env:
args: ["taskmanager"]
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public class KubernetesConfigOptions {
.withDescription(
"Image to use for Flink containers. "
+ "The specified image must be based upon the same Apache Flink and Scala versions as used by the application. "
+ "Visit https://hub.docker.com/_/flink?tab=tags for the images provided by the Flink project.");
+ "Visit https://hub.docker.com/_/flink?tab=tags for the official docker images provided by the Flink project. The Flink project also publishes docker images here: https://hub.docker.com/r/apache/flink");

/** The following config options need to be set according to the image. */
public static final ConfigOption<String> KUBERNETES_ENTRY_PATH =
Expand Down Expand Up @@ -352,7 +352,7 @@ private static String getDefaultFlinkImage() {
: EnvironmentInformation.getVersion()
+ "-scala_"
+ EnvironmentInformation.getScalaVersion();
return "flink:" + tag;
return "apache/flink:" + tag;
}

/** The flink rest service exposed type. */
Expand Down

0 comments on commit 03ca399

Please sign in to comment.