Skip to content

Instantly share code, notes, and snippets.

@ederrafo
Last active December 7, 2022 23:19
Show Gist options
  • Save ederrafo/d27a3fcc3bbd7e56bc8b0a9e54e60fc7 to your computer and use it in GitHub Desktop.
Save ederrafo/d27a3fcc3bbd7e56bc8b0a9e54e60fc7 to your computer and use it in GitHub Desktop.
docker dockerfile

Dockerfile

Contiene todos las instrucciones necesarias para crear una imagen donde corra nuestra aplicacion
Dockerfile + docker image build + imagen
Las imagenes 

Creamos una imagen de ejemplo

$ touch ~/dockerfiles/sample/Dockerfile

Ponemos

# usara la imagen base ubuntu 20.04
FROM ubuntu:20.04
# ejecutara este comando cuando inicie
ENTRYPOINT echo "Bienvenidos al curso de docker"

Creamos nuestra primera image

docker image build --tag sample .

Dockerfile Ruby

FROM ruby:2.3.1

RUN mkdir /app
RUN mkdir /app/logs
WORKDIR /app

COPY . /app

RUN cd /app
RUN gem install sassc -v '2.3.0'
RUN bundle install

CMD rails s -e production -p 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment