Skip to content

Instantly share code, notes, and snippets.

@Ryanb58
Last active July 21, 2025 20:50
Show Gist options
  • Save Ryanb58/9e63e186981090d4f2de8ec0ea420e1d to your computer and use it in GitHub Desktop.
Save Ryanb58/9e63e186981090d4f2de8ec0ea420e1d to your computer and use it in GitHub Desktop.
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found

/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
OK: 9051 distinct packages available

/app # apk add busybox-extras
(1/1) Installing busybox-extras (1.27.2-r11)
Executing busybox-extras-1.27.2-r11.post-install
Executing busybox-1.27.2-r7.trigger
OK: 77 MiB in 64 packages

/app # busybox-extras telnet localhost 6900

@brnpimentel
Copy link

Thanks!

@rogperez
Copy link

rogperez commented Feb 1, 2023

Thanks!

@kevinchatham
Copy link

Thanks!

@sudharshan-ravindran
Copy link

Thanks!

@wengkham
Copy link

Thank you, helps alot!

@sankalp-khare
Copy link

thanks!

@0605AbMu
Copy link

thanks!

@hniia
Copy link

hniia commented Aug 22, 2023

use nc already there

@KlausThornProgrammfabrik

thanks!

@bmueller0885
Copy link

Thanks

@alirezavafaee
Copy link

Thank you

@gy0857478
Copy link

謝謝

@RaedShari
Copy link

شكراً

@tajoutihamza
Copy link

thanks

@nmandzyk
Copy link

thanks

@humblewolf
Copy link

thanks

@hieunt0303
Copy link

thanks

@shayan0v0n
Copy link

Thanks

@ssarbadh
Copy link

Thank you @Ryanb58

@pramoso
Copy link

pramoso commented Apr 30, 2024

Thanks!!

@jayu
Copy link

jayu commented May 3, 2024

Thanks!

btw apk add inetutils-telnet installs just telnet that can be used directly

@fhperuchi
Copy link

Thanks!

@fuad-daoud
Copy link

Thanks

@htech9
Copy link

htech9 commented Oct 4, 2024

Very helpful, thanks

@RedClouud
Copy link

Thanks!

@Dcfgvy
Copy link

Dcfgvy commented Dec 11, 2024

thanks!

@gubendranl
Copy link

Thank you

@DySprozin
Copy link

Thanks!

@arunvelsriram
Copy link

You could also setup a symlink and invoke telnetdirectly:

ln -s /usr/bin/busybox-extras /usr/bin/telnet
telnet localhost 6900

@vadym-masiuk
Copy link

vadym-masiuk commented Jul 21, 2025

You could also setup a symlink and invoke telnetdirectly:

ln -s /usr/bin/busybox-extras /usr/bin/telnet
telnet localhost 6900

As far as I remember commands @Ryanb58 posted doesn't require it, because it will be automatically linked at the end of installation already

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