Scope. Dockerfile instructions for Docker BuildKit. Examples below are separate instruction references, not a complete application. EXPOSE documents a port; publishing it requires an appropriate docker run -p option.
Dockerfile provides the instructions needed to build a container and the commands to be executed when the container runs.
Inheritance
FROM ruby:3.3-slim
Variables
ENV APP_HOME=/myapp
RUN mkdir $APP_HOME
Initialization
RUN bundle install
WORKDIR /myapp
Onbuild
ONBUILD RUN bundle install
Commands
EXPOSE 5900
CMD ["bundle", "exec", "rails", "server"]