0

I have a docker-compose file like this:

version: '3'
services:

  namenode:
    image: bde2020/hadoop-namenode:2.0.0-hadoop2.7.4-java8
    container_name: namenode
    volumes:
      - ./hdfs/namenode:/hadoop/dfs/name
    environment:
      - CLUSTER_NAME=hive
    env_file:
      - ./hadoop-hive.env
    ports:
      - "50070:50070"

but after docker exec -it namenode /bin/bash I can not find python in it . How do I add python in these containers ?

I tried installing python after logging into containers (apt-get install) but it fails to fetch required files from deb.debian

Failed to fetch http://deb.debian.org/debian/pool/main/p/python3.4/python3.4-minimal_3.4.2-1_amd64.deb 404 Not Found

Thanks

vijay shanker
  • 2,517
  • 1
  • 24
  • 37
  • 1
    If you want Python available in your container, you will need to build your own image (probably based on the `bde2020/hadoop-namenode` image) with the appropriate packages installed (and then use that image in your compose file). – larsks Jun 08 '23 at 19:24
  • Do you actually need to run Python within the HDFS server infrastructure; or can you run a separate Python container that connects to this HDFS? – David Maze Jun 08 '23 at 20:59
  • that's even a better idea, connect to hdfs.. actual use case is to run a spark job for data compaction of parquet files stored in hdfs @DavidMaze – vijay shanker Jun 09 '23 at 04:58

0 Answers0