Docker Community Forums

Share and learn in the Docker community.

Install additional linux tools

docker

(Ujankrif) #1

Hello !
I’m quite new to docker.
I want to add the Linux korn Shell to an existing Container:

docker version

Client:
Version: 1.12.2
API version: 1.24
Go version: go1.6.3
Git commit: bb80604
Built:
OS/Arch: linux/amd64

Server:
Version: 1.12.2
API version: 1.24
Go version: go1.6.3
Git commit: bb80604
Built:
OS/Arch: linux/amd64

docker pull angoca/db2-install
docker run -it -d -p 50000:50000 angoca/db2-install:latest
docker attach 6b84793b40b6

root@6b84793b40b6:/# apt-get install ksh
=> E: Unable to locate package ksh

How to get it installed? It’s more a Linux than a docker Problem, right?

Kind regards
Ulli


(Ronrademaker) #2

You should install additional packages using a Dockerfile so they get build into the image. Something like:

Dockerfile:

FROM angoca/db2-install

RUN apt-get update && apt-get install ksh

Build command (from same directory as the Dockerfile):

docker build .

Might work, but perhaps you need to add some apt sources first.


(Ujankrif) #3

Thanks, that works for me!