5

I am using the ubuntu:16.04 image, but apparently it doesn't have the hexdump package (because some other stuff I do in the image are failing because of it). So, I tried to apt-get install hexdump but got an error E: Unable to locate package hexdump.

When I search for info online it seems like this package should be installed with Ubuntu by default, but maybe in the Docker image it was stripped out. And thus I can't really find sources for how to install it.

7

hexdump utility is part of bsdmainutils package.

Alternatively, you could use xxd from the xxd package

| improve this answer | |
3

Add the following command in the Dockerfile of the image:

RUN apt-get install bsdmainutils
| improve this answer | |
0

You can generate docker image based on ubuntu 16.04 and copy xxd from ubuntu LTS into docker image.

The Dockerfile looks like

FROM amd64/ubuntu:16.04
COPY xxd /usr/bin/xxd
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.