Skip to content

Instantly share code, notes, and snippets.

@mborodov
Last active March 14, 2023 09:23
Show Gist options
  • Save mborodov/6a7f82b2e47305a941acdbf8d8c80166 to your computer and use it in GitHub Desktop.
Save mborodov/6a7f82b2e47305a941acdbf8d8c80166 to your computer and use it in GitHub Desktop.
How to install telnet into a alpine docker container
docker exec -it CONTAINERID sh
/app # telnet
sh: telnet: not found

/app # apk update
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/aarch64/APKINDEX.tar.gz
v3.16.4-66-g2c3dfa6d54d [https://dl-cdn.alpinelinux.org/alpine/v3.16/main]
v3.16.4-66-g2c3dfa6d54d [https://dl-cdn.alpinelinux.org/alpine/v3.16/community]
OK: 16894 distinct packages available

/app # apk add busybox-extras
(1/1) Installing busybox-extras (1.35.0-r17)
Executing busybox-extras-1.35.0-r17.post-install
Executing busybox-1.35.0-r17.trigger
OK: 56 MiB in 43 packages

/app # telnet 
BusyBox v1.35.0 (2022-08-01 15:14:44 UTC) multi-call binary.

Usage: telnet [-a] [-l USER] HOST [PORT]

Connect to telnet server

        -a      Automatic login with $USER variable
        -l USER Automatic login as USER

Enjoy! 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment