docker-compose.yaml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. version: "3"
  17. services:
  18. namenode:
  19. image: flokkr/hadoop:${HADOOP_VERSION}
  20. ports:
  21. - 9870:9870
  22. env_file:
  23. - ./docker-config
  24. environment:
  25. ENSURE_NAMENODE_DIR: "/tmp/hadoop-root/dfs/name"
  26. command: ["hdfs", "namenode"]
  27. datanode:
  28. image: flokkr/hadoop:${HADOOP_VERSION}
  29. ports:
  30. - 9864
  31. volumes:
  32. - ../..:/opt/ozone
  33. command: ["hdfs","datanode"]
  34. environment:
  35. HADOOP_CLASSPATH: /opt/ozone/share/hadoop/ozoneplugin/hadoop-ozone-datanode-plugin.jar
  36. env_file:
  37. - ./docker-config
  38. ozoneManager:
  39. image: apache/hadoop-runner
  40. volumes:
  41. - ../..:/opt/hadoop
  42. ports:
  43. - 9874:9874
  44. environment:
  45. ENSURE_OM_INITIALIZED: /data/metadata/ozoneManager/current/VERSION
  46. env_file:
  47. - ./docker-config
  48. command: ["ozone","om"]
  49. scm:
  50. image: apache/hadoop-runner
  51. volumes:
  52. - ../..:/opt/hadoop
  53. ports:
  54. - 9876:9876
  55. env_file:
  56. - ./docker-config
  57. environment:
  58. ENSURE_SCM_INITIALIZED: /data/metadata/scm/current/VERSION
  59. command: ["ozone","scm"]