Skip to content

Instantly share code, notes, and snippets.

@Sudok
Created April 28, 2017 17:08
Show Gist options
  • Save Sudok/34d9799840034e57cc8f02b6a935fd09 to your computer and use it in GitHub Desktop.
Save Sudok/34d9799840034e57cc8f02b6a935fd09 to your computer and use it in GitHub Desktop.
Dockerfile bootcamp
FROM ruby:2.3-slim
# Instala as nossas dependencias
RUN apt-get update && apt-get install -qq -y --no-install-recommends \
build-essential nodejs libpq-dev
# Seta nosso path
ENV INSTALL_PATH /usr/src/app
# Cria nosso diretório
RUN mkdir -p $INSTALL_PATH
# Seta o nosso path como o diretório principal
WORKDIR $INSTALL_PATH
# Copia o nosso Gemfile para dentro do container
COPY Gemfile ./
# Instala as Gems
RUN bundle install
# Copia nosso código para dentro do container
COPY . .
# Roda nosso servidor
CMD ["rails", "server", "-b", "0.0.0.0"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment