[ https://issues.apache.org/jira/browse/FLINK-4900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15658508#comment-15658508 ]
ASF GitHub Bot commented on FLINK-4900: --------------------------------------- Github user EronWright commented on a diff in the pull request: https://github.com/apache/flink/pull/2703#discussion_r87674266 --- Diff: flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosApplicationMasterRunner.java --- @@ -601,6 +601,54 @@ else if (recoveryMode == HighAvailabilityMode.ZOOKEEPER) { info.setCommand(cmd); + // Set base container for task manager if specified in configs. + String taskManagerContainerName = flinkConfig.getString( + ConfigConstants.MESOS_RESOURCEMANAGER_TASKS_CONTAINER_IMAGE_NAME, ""); + + if (taskManagerContainerName.length() > 0) { + String taskManagerContainerType = flinkConfig.getString( + ConfigConstants.MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE, + ConfigConstants.DEFAULT_MESOS_RESOURCEMANAGER_TASKS_CONTAINER_IMAGE_TYPE); + + Protos.ContainerInfo.Builder containerInfo; + + switch (taskManagerContainerType) { + case ConfigConstants.MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE_MESOS: + containerInfo = Protos.ContainerInfo.newBuilder() + .setType(Protos.ContainerInfo.Type.MESOS) + .setMesos(Protos.ContainerInfo.MesosInfo.newBuilder() + .setImage(Protos.Image.newBuilder() + .setType(Protos.Image.Type.DOCKER) + .setDocker(Protos.Image.Docker.newBuilder() + .setName(taskManagerContainerName)))); + break; + case ConfigConstants.MESOS_RESOURCEMANAGER_TASKS_CONTAINER_TYPE_DOCKER: + containerInfo = Protos.ContainerInfo.newBuilder() + .setType(Protos.ContainerInfo.Type.DOCKER) + .setDocker(Protos.ContainerInfo.DockerInfo.newBuilder() + .setNetwork(Protos.ContainerInfo.DockerInfo.Network.HOST) + .setForcePullImage(true) --- End diff -- "setForcePullImage" is probably not appropriate in production; for dev/test you probably need to use an explicit image tag, not 'latest'. > Implement Docker image support > ------------------------------ > > Key: FLINK-4900 > URL: https://issues.apache.org/jira/browse/FLINK-4900 > Project: Flink > Issue Type: Sub-task > Components: Cluster Management > Reporter: Eron Wright > Assignee: Eron Wright > > Support the use of a docker image, with both the unified containerizer and > the Docker containerizer. > Use a configuration setting to explicitly configure which image and > containerizer to use. -- This message was sent by Atlassian JIRA (v6.3.4#6332)