Creating a simple rails docker image for testing in cloud deployment

Trying to deploy a rails application in a cloud provider ie dreamhost, that uses OpenStack these are the steps needed:

  1. Install docker in your development machine and your cloud provider by following the installation instructions from here
  2. Create an account in Docker Hub, that will be needed later on to push your docker image with the application
  3. Pull the official rails docker image to your development environment:
    sudo docker pull rails:latest
  4. Create a new simple rails application:
    rails new docker_test
  5. Change to the application directory and add a Dockerfile in the root directory containing the following:
    FROM rails:onbuild
  6. Build your new image by using:
    sudo docker build -t rails_docker_test .
  7. Check that your image was build by using:
    sudo docker images
  8. Start the container with:
    sudo docker run --name rails_test -p -d rails_docker_test
  9. Make sure that you can see the initial rails page by using your browser to go to
  10. Push your image to your Docker Hub account by first logging in to it from the command line:
    sudo docker login --username=yourhubusername

    , and then when you get ‘Login Succeeded’, push your image to your account:

    sudo docker push yourhubusername/rails_docker_test
  11. TBC

Dreamhost, DreamCompute(OpenStack) ssh login


You have just created your first instance in Dreamhost’s new service DreamCompute using OpenStack and you would like to login with ssh, but you get ‘Permission Denied’.


The solution is described here, and it’s the fact that the user name that you need to use is not your Dreamhost account name, or the DreamCompute dashboard user anme but the the username called:


NOTE: It seems that is also described here, at the bottom.