This is the Dockerfile
FROM docker.elastic.co/beats/filebeat:7.8.0
RUN apt-get update && apt-get install -y telnet && rm -rf /var/lib/apt/lists/*
COPY ./filebeat.docker.yml /usr/share/filebeat/filebeat.yml
But unable to execute the second line… I tried with other filebeat:7.17.3 version as well but it gives the same error.
This is the error
[+] Building 0.7s (6/7) docker:default
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 222B 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.elastic.co/beats/filebeat:7.8.0 0.0s
=> [1/3] FROM docker.elastic.co/beats/filebeat:7.8.0 0.2s
=> [internal] load build context 0.1s
=> => transferring context: 464B 0.0s
=> ERROR [2/3] RUN apt-get update && apt-get install -y telnet && rm -rf /var/lib/apt/lists/* 0.4s
------
> [2/3] RUN apt-get update && apt-get install -y telnet && rm -rf /var/lib/apt/lists/*:
0.375 /bin/sh: apt-get: command not found
------
Dockerfile:2
--------------------
1 | FROM docker.elastic.co/beats/filebeat:7.8.0
2 | >>> RUN apt-get update && apt-get install -y telnet && rm -rf /var/lib/apt/lists/*
3 | COPY ./filebeat.docker.yml /usr/share/filebeat/filebeat.yml
4 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update && apt-get install -y telnet && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 127
Could somebody suggest me a way to resolve this? Tried with apk update as well it also doesn’t seem to work… I’m using ubuntu via wsl…