Public | Automated Build

Last pushed: 2 years ago
Short Description
Docker Image for a Ruby CGI Project
Full Description


Docker Image for a Ruby CGI Project

Docker pull command

docker pull hiro511/ruby-cgi

Start a Ruby CGI project simply

docker run -d -p 80:80 --name my-running-app -v my-project:/usr/local/apache2/htdocs hiro511/ruby-cgi

Create a Dockerfile in your Ruby CGI project

FROM hiro511/ruby-cgi

COPY ./public-html/ /usr/local/apache2/htdocs/

Then, run the commands to build and run the Docker image:

docker build -t my-ruby-cgi .
docker run -d -p 80:80 --name my-running-app my-ruby-cgi

Without a Dockerfile

If you don't want to include a Dockerfile in your project, It is sufficient to do the folloing:

docker run -itd -p 80:80 --name my-running-app -v "$PWD":/usr/local/apache2/htdocs/ hiro511/ruby-cgi:latest

Docker Pull Command
Source Repository