/docker-rails-blog

Run rails inside docker container

Primary LanguageRubyMIT LicenseMIT

docker-rails-blog

Run rails inside docker container

Usage

Build Image

docker build -t kr1sp1n/docker-rails-blog:<NEW VERSION> .

Tag Latest

docker tag -f <IMAGE ID> kr1sp1n/docker-rails-blog:latest

Run Containers

docker run -d --name postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=docker postgres:latest

This will run the postgres container and set a password.

docker run --name docker-rails-blog -p 8080:3000 --link postgres:db -d kr1sp1n/docker-rails-blog:latest

This will also link the container to the postgres container and give alias db.