Skip to content

Instantly share code, notes, and snippets.

@alvinlai
Last active August 29, 2015 14:11
Show Gist options
  • Save alvinlai/5bea92dfdbe11491c676 to your computer and use it in GitHub Desktop.
Save alvinlai/5bea92dfdbe11491c676 to your computer and use it in GitHub Desktop.
Handson Dockernotes Update

Notes

This was preventing the alvin/handson-postgres image from being downloaded:

moby/moby#9327

I had to modify the Dockerfiles and rebuild them for a couple of reasons:

  • docker pull only downloads images tagged 'latest'. While this can be circumvented with a -a flag, it didn't seem to work for me.
  • the old images were built off ubuntu 12.10 which is deprecated, apt sources for that version is no longer available.
  • postgres's default template database uses ASCII. database.yml in Rails had to be updated to use template0 which uses UTF8.

Running this

  • docker pull alvin/handson-postgres2
  • docker pull alvin/handson-dockernotes2
  • docker run -t -d --name db alvin/handson-postgres2
  • docker ps
  • docker run -d -t -p 80:3000 --link db:db alvin/handson-dockernotes2 bundle exec rake db:create
  • docker run -d -t -p 80:3000 --link db:db alvin/handson-dockernotes2 bundle exec rake db:migrate
  • docker run -d -t -p 80:3000 --link db:db alvin/handson-dockernotes2

Changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment