Modifying golang Docker Container using the running shell

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 swarm and private registry
  • Kubernetes: single-node file server mount failed in container cluster
  • Can docker write to a cd?
  • Setting up three docker images - one as a proxy to the other two
  • All node modules in package.json are being re-downloaded after small change
  • Compilation of program on Docker is slow
  • 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?

  • Running Docker as a syslog-ng destination fails
  • How do symlinks in a host volume work in Docker containers?
  • OpenShift V3 vs. OpenShift V2 [closed]
  • how to configure docker to limit the range of ports for spinning up containers
  • Docker container sharing clipboard with host
  • What docker volume drivers available that are compatible with windows docker containers?
  • 2 Solutions collect form web for “Modifying golang Docker Container using the running shell”

    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.

    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

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.