An open API service indexing awesome lists of open source software.

https://github.com/bkuhlmann/docker-alpine-ruby

A Ruby focused Docker image with current tooling for development purposes.
https://github.com/bkuhlmann/docker-alpine-ruby

alpine-linux docker ruby

Last synced: 3 months ago
JSON representation

A Ruby focused Docker image with current tooling for development purposes.

Awesome Lists containing this project

README

          

:toc: macro
:toclevels: 5
:figure-caption!:

:jemalloc_link: link:https://jemalloc.net[jemalloc]
:milestoner_link: link:https://alchemists.io/projects/milestoner[Milestoner]
:ruby_link: link:https://www.ruby-lang.org[Ruby]
:yjit_link: link:https://speed.yjit.org[YJIT]

= Docker Alpine Ruby

Provides a {ruby_link} focused Docker image with current tooling for development purposes. Great for
local development and/or continuous integration builds using the most up-to-date tooling.

toc::[]

== Features

* Uses the link:https://alchemists.io/projects/docker-alpine-base[Docker Alpine Base] image.
* Installs {jemalloc_link}.
* Installs {ruby_link} with {yjit_link}.
* Updates link:https://rubygems.org[RubyGems].

== Requirements

. link:https://www.docker.com[Docker].

== Setup

To set up the project, run:

[source,bash]
----
git clone https://github.com/bkuhlmann/docker-alpine-ruby.git
cd docker-alpine-ruby
git checkout 4.6.1
----

== Usage

All versions of this image can be found on
link:https://hub.docker.com/r/bkuhlmann/alpine-ruby/tags[Docker Hub]. The image can be pulled as follows:

[source,bash]
----
docker pull bkuhlmann/alpine-ruby:latest # <= Pull latest version.
docker pull bkuhlmann/alpine-ruby:4.6.1 # <= Pull specific version.
----

You can also build on top of this image via your `Dockerfile`:

[source,dockerfile]
----
FROM bkuhlmann/alpine-ruby:latest # <= Latest version.
FROM bkuhlmann/alpine-ruby:4.6.1 # <= Specific version.
----

The following configuration is used when building Ruby:

* `--build="$gnuArch"`: Enables cross compilation by ensuring {ruby_link} is built for a GNU architecture regardless of the current machine used to build Ruby.
* `--disable-install-doc`: Prevents the installationg of documentation in order to keep the image small.
* `--enable-shared ${rustArch:+--enable-yjit}`: Checks the `rustArch` environment variable is set and enables {yjit_link}. Otherwise, YJIT is disabled.

== Development

To contribute, run:

[source,bash]
----
git clone https://github.com/bkuhlmann/docker-alpine-ruby.git
cd docker-alpine-ruby
----

To build, run:

[source,bash]
----
bin/build
----

To use the console, run:

[source,bash]
----
bin/console
----

To deploy the _latest_ version, run:

[source,bash]
----
bin/deploy
----

To automatically calculate the next logical version and deploy it, run:

[source,bash]
----
bin/deploy p
----

Versions are calculated and created via the {milestoner_link} gem. Best practice is to deploy both the latest version and next version. Example:

[source,bash]
----
bin/deploy
bin/deploy p
----

The above will ensure new images are created with the following tags:

* `latest`: This is the most recent stable version which may or may not be ahead of the last version released.
* `..`: This the next logical version as calculated and created by {milestoner_link}.

== Tests

To test, run:

[source,bash]
----
bin/console
ruby --version
----

== link:https://alchemists.io/policies/license[License]

== link:https://alchemists.io/policies/security[Security]

== link:https://alchemists.io/policies/code_of_conduct[Code of Conduct]

== link:https://alchemists.io/policies/contributions[Contributions]

== link:https://alchemists.io/policies/developer_certificate_of_origin[Developer Certificate of Origin]

== link:https://alchemists.io/projects/docker-alpine-ruby/versions[Versions]

== link:https://alchemists.io/community[Community]

== Credits

* Built with link:https://alchemists.io/projects/rubysmith[Rubysmith].
* Engineered by link:https://alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].