1

I'm using Docker to deploy my web service to Google Compute Engine and I'm following the instructions given here: https://blog.golang.org/docker

I want to install ffmpeg in the golang container and my approach is to get access to the shell as

docker run -t -i my-webservice /bin/bash

In contrary to the ubuntu:14.04 image, I don't get access to the bash shell. How can that be?

I have also found an image, where the ffmpeg is already configured and installed (https://registry.hub.docker.com/u/cellofellow/ffmpeg/). Is it possible to get access to the container from the golang container or do I have to install ffmpeg into my own docker image?

3
  • Did you try /bin/sh? Bash is not a must on Linux. There might be other shell installed, probably dash. Commented Nov 18, 2014 at 19:19
  • Unfortunately, that doesn't work either. I have tried csh, tcsh, ksh, sh (assumed installed in /bin) Commented Nov 18, 2014 at 19:45
  • Although you probably should be incorporating the ffmpeg installation as much as possible into the Dockerfile, if you really need access to the container use docker-enter from the nsenter package. Install using docker run --rm -v /usr/local/bin:/target jpetazzo/nsenter. See github.com/jpetazzo/nsenter for more info. Commented Nov 20, 2014 at 13:01

2 Answers 2

1

A better approach would be to install ffmpeg to your golang container by adding a RUN to your Dockerfile, like

RUN apt-get update RUN apt-get install -y ffmpeg

The words modifying, Docker Container, running shell, kind of contradicts the meaning of Docker.

Sign up to request clarification or add additional context in comments.

Comments

0

Installing ffmepeg is not as simple if additional codecs need to be installed as well, being the reason that I would like to play around using the shell before writing the docker script (copying the Docker script from cellofellow/ffmpeg works).

An answer to the problems are described here: https://github.com/docker-library/golang/issues/27

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.