Ubuntu docker image with Ruby installation
86
This image was created using an Official Ubuntu image and Ruby was installed there with the intention of being used by students in the development of activities and projects in the discipline of Software Engineering, of the Computer Science course.
In order to run this container you'll need docker installed.
Using this command below, your ruby script will be executed directly. Remember to be in the directory where the script is.
$ docker run -it --rm --name my-script-name -v "$PWD":/usr/src/myapp -w /usr/src/myapp vrmartins05/rubyaulas:1.0 ruby your-project-script.rb
Creating a container with the image so that you can access it and execute your ruby codes or scripts. That way it is possible to manipulate the container, install and take advantage of the resources of the instance.
$ docker run -it -d --name contaniner-name -v /your/file/location/:/your/file/container/ vrmartins05/rubyaulas:1.0
Using the -v parameter, a volume will be created that will share local files with the container.
/your/file/location/ - Path that is your local files/your/file/container/ - Path that will be created in the container that will contain your shared local files.To use the resources of the container it is necessary to access it, and for that we will use the container ID with the following command.
$ docker ps
Use the following command to access the container
$ docker exec -it containerID /bin/bash
Content type
Image
Digest
Size
61.9 MB
Last updated
over 6 years ago
docker pull vrmartins05/rubyaulas:1.0