Sign inSign up

vrmartins05/rubyaulas

By vrmartins05

•Updated over 6 years ago

Ubuntu docker image with Ruby installation

Image
0

86

vrmartins05/rubyaulas repository overview

⁠What is RubyAulas

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.

⁠Getting Started

⁠Prerequisities

In order to run this container you'll need docker installed.

⁠Usage

⁠Run a single Ruby script

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
⁠Create a container

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
⁠Volumes

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.
⁠Using a container

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

⁠Authors

Tag summary

Content type

Image

Digest

Size

61.9 MB

Last updated

over 6 years ago

docker pull vrmartins05/rubyaulas:1.0