Docker services in image not launching

I am new to docker. I’ve prepared a docker image. On it, I’ve installed application as user root. On launch, the root .bashrc contains some lines that be execute. On the machine where I prepare the image, all was running correcting. I saved the image as a tar with the command docker save to a tar file. Using the tar file, I loaded the image on another machine. Using docker, when I start the image using the command docker run, it doesn’t execute the root .bashrc. When I execute it manually using source .bashrc it executes but there are services which fails. Any idea why this is happening ? Because I was thinking that the moment you have the image, you load the image in a container, it is expected to work similarly everywhere.

  • Docker can not be installed on CentOS
  • Docker CentOS image does not auto start httpd
  • Docker complaining about ALL_PROXY environment variable with “proxy: unknown scheme: http”
  • GDB empty backtrace when using gunicorn core dump
  • Docker Run With SELinux on ubuntu Constrain violation
  • Docker: --ipc=host and security
  • How to monitor multiple docker container on the same host using topbeat?
  • How to Access AWS EC2 docker tomcat instance running inside jenkins docker instance from my local browser
  • Add and delete links to a docker container dynamically
  • Docker stuck on “Waiting for SSH to be available…”
  • Migration of docker image from AWS to Bluemix or Azure
  • How to mount Hadoop HDFS
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.