title: Elasticsearch docker - apt repository
body: <p>I'm very new to Docker and Linux as a whole. I'm trying to setup some docker configuration using this compose yml file to spin up some docker images on Ubuntu 20.04. When I go into elasticsearch image using:</p>
  <pre><code>docker exec -it &lt;imagename&gt; /bin/bash
  </code></pre>
  <p>I'm unable to run:</p>
  <pre><code>apt-get update
  </code></pre>
  <p>it says command is not found. How can I install these repositories for that elasticsearch version?</p>
  <pre><code>version: &quot;3.7&quot;
  
  services:
    cassandra:
      container_name: cassandra
      image: cassandra:3.11
      restart: unless-stopped
      hostname: cassandra
      environment:
        - MAX_HEAP_SIZE=1G
        - HEAP_NEWSIZE=1G
        - CASSANDRA_CLUSTER_NAME=thp
      volumes:
        - ./cassandra/data:/var/lib/cassandra/data
      networks:
        - Hive
  
    elasticsearch:
      container_name: elasticsearch
      image: elasticsearch:7.11.1
      environment:
        - http.host=0.0.0.0
        - discovery.type=single-node
        - cluster.name=hive
        - script.allowed_types= inline
        - thread_pool.search.queue_size=100000
        - thread_pool.write.queue_size=10000
        - gateway.recover_after_nodes=1
        - xpack.security.enabled=false
        - bootstrap.memory_lock=true
        - ES_JAVA_OPTS=-Xms256m -Xmx256m
      ulimits:
        nofile:
          soft: 65536
          hard: 65536
      volumes:
        - ./elasticsearch/data:/usr/share/elasticsearch/data
        - ./elasticsearch/logs:/usr/share/elasticsearch/logs
      networks:
        - Hive
    
    cortex:
      container_name: cortex
      image: thehiveproject/cortex:latest
      depends_on:
        - elasticsearch
      environment:
        - 'JOB_DIRECTORY=/opt/cortex/jobs'
      ports:
        - '0.0.0.0:9001:9001'
      volumes:
        - ./cortex/application.conf:/etc/cortex/application.conf
        - '/var/run/docker.sock:/var/run/docker.sock'
        - ./cortex/log/:/var/log/cortex
        - /tmp:/tmp
        #- ./cortex/Cortex-Analyzers:/opt/cortex/analyzers
        #- .cortex/Cortex-Analyzers/analyzers.json:/opt/cortex/analyzers/analyzers.json
      privileged: true
      networks:
        - Hive
    
    thehive:
      container_name: thehive
      image: 'thehiveproject/thehive4:latest'
      restart: unless-stopped
      depends_on:
        - cassandra
      ports:
        - '0.0.0.0:9000:9000'
      volumes:
        - ./thehive/application.conf:/etc/thehive/application.conf
        - ./thehive/data:/opt/thp/thehive/data
        - ./thehive/index:/opt/thp/thehive/index
      command:
        --cortex-port 9001
        --cortex-keys ${CORTEX_KEY}
      networks:
        - Hive
        
  networks:
      Hive:
          driver: bridge
  </code></pre>
  <p>Thanks in advance.</p>