Skip to content

Instantly share code, notes, and snippets.

@developer88
Created July 29, 2022 08:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save developer88/f5d0b52be2e822f6b1e01a93a749b396 to your computer and use it in GitHub Desktop.
Save developer88/f5d0b52be2e822f6b1e01a93a749b396 to your computer and use it in GitHub Desktop.
Ruby docker env
# More docs on docker-compose.yml => https://docs.docker.com/compose/compose-file/
version: "3.7"
services:
ruby_dev:
build: .
container_name: ruby_container
ports:
- "3000:3000"
volumes:
- ./:/home/app
# More docs on Dockerfile syntax => https://docs.docker.com/engine/reference/builder/
# Set proper ruby version from the right image https://hub.docker.com/_/ruby?tab=tags
FROM ruby
WORKDIR /home/app
ENV PORT 3000
EXPOSE $PORT
RUN gem install rails bundler
RUN gem install rails
RUN apt-get update -qq && apt-get install -y nodejs
ENTRYPOINT [ "/bin/bash" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment