docker-compose.yaml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Licensed to the Apache Software Foundation (ASF) under one or more
  2. # contributor license agreements. See the NOTICE file distributed with
  3. # this work for additional information regarding copyright ownership.
  4. # The ASF licenses this file to You under the Apache License, Version 2.0
  5. # (the "License"); you may not use this file except in compliance with
  6. # the License. You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. version: "2"
  16. services:
  17. namenode:
  18. build: .
  19. hostname: namenode
  20. command: ["hdfs", "namenode"]
  21. ports:
  22. - 50070:50070
  23. env_file:
  24. - ./config
  25. environment:
  26. ENSURE_NAMENODE_DIR: "/tmp/hadoop-root/dfs/name"
  27. datanode:
  28. build: .
  29. command: ["hdfs", "datanode"]
  30. env_file:
  31. - ./config
  32. resourcemanager:
  33. build: .
  34. hostname: resourcemanager
  35. command: ["yarn", "resourcemanager"]
  36. ports:
  37. - 8088:8088
  38. env_file:
  39. - ./config
  40. volumes:
  41. - ./test.sh:/opt/test.sh
  42. nodemanager:
  43. build: .
  44. command: ["yarn", "nodemanager"]
  45. env_file:
  46. - ./config