Skip to content

Instantly share code, notes, and snippets.

@GCorbel
Last active July 25, 2017 09:21
Show Gist options
  • Select an option

  • Save GCorbel/0842948790272bcc7a69f7f143c35bc8 to your computer and use it in GitHub Desktop.

Select an option

Save GCorbel/0842948790272bcc7a69f7f143c35bc8 to your computer and use it in GitHub Desktop.
My docker setup to use it in dev
# I have a docker-compose.override.yml with custom information. It share my history files so I can use it with `docker-compose run rails c``
version: '3'
services:
web:
volumes:
- .:/app
- ~/.zsh_history:/root/.zsh_history
- ~/.zsh_history.new:/root/.zsh_history.new
- ~/.pryrc:/root/.pryrc
- ~/.pry_history:/root/.pry_history
- ~/.inputrc:/root/.inputrc
- ~/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub
- ~/.ssh/id_rsa:/root/.ssh/id_rsa
- ~/.ssh/known_hosts:/root/.ssh/known_hosts
- /etc/localtime:/etc/localtime
- $SSH_AUTH_SOCK:/ssh-agent
- /usr/local/bundle:/usr/local/bundle
# I have a docker-compose.yml with generic information
version: '3'
services:
web:
build: .
command: rails s -b 0.0.0.0
working_dir: /app
volumes:
- .:/app
- /etc/localtime:/etc/localtime
- $SSH_AUTH_SOCK:/ssh-agent
ports:
- "3000:3000"
environment:
BUNDLE_JOBS: 20
# In the Dockerfile I add tools I like
RUN apt-get install wget && wget https://github.com/GCorbel/dotfiles/raw/master/development_docker_install.sh -O - | sh
# I also use this https://gist.github.com/GCorbel/7f31349bcd4dca45047f21c07d47f205 to do `run rake ...` for example.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment