Skip to content

Commit

Permalink
Merge pull request #109 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 3.0.0
  • Loading branch information
andyone authored Jan 18, 2023
2 parents 4d90cac + 4145024 commit ba6d57c
Show file tree
Hide file tree
Showing 20 changed files with 700 additions and 826 deletions.
41 changes: 41 additions & 0 deletions .docker/jruby.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## REGISTRY CONFIGURATION ######################################################

ARG REGISTRY="docker.io"

## BUILDER #####################################################################

FROM ${REGISTRY}/essentialkaos/oraclelinux:8 as installer

ARG RUBY_VERSION=9.3.9.0

RUN dnf -y -q install https://yum.kaos.st/kaos-repo-latest.el8.noarch.rpm && \
dnf -y -q install rbenv rbinstall jre11 && \
dnf -y -q module disable "*" && dnf clean all && rm -rf /var/cache/dnf /var/log/dnf.* && \
rbinstall jruby-${RUBY_VERSION} --no-progress

## FINAL IMAGE ################################################################

FROM ${REGISTRY}/essentialkaos/oraclelinux:8

ARG RUBY_VERSION=9.3.9.0

LABEL org.opencontainers.image.title="rbinstall-ruby" \
org.opencontainers.image.description="RBEnv with prebuilt Ruby" \
org.opencontainers.image.vendor="ESSENTIAL KAOS" \
org.opencontainers.image.authors="Anton Novojilov" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.url="https://kaos.sh/rbinstall" \
org.opencontainers.image.source="https://github.com/essentialkaos/rbinstall"

COPY --from=installer /usr/local/rbenv/versions/jruby-${RUBY_VERSION} \
/usr/local/rbenv/versions/jruby-${RUBY_VERSION}

RUN dnf -y -q install https://yum.kaos.st/kaos-repo-latest.el8.noarch.rpm && \
dnf -y -q install rbenv jre11 && \
dnf -y -q module disable "*" && dnf clean all && rm -rf /var/cache/dnf /var/log/dnf.* && \
source /etc/profile.d/rbenv.sh && \
rbenv global jruby-${RUBY_VERSION}

ENV PATH /usr/local/rbenv/shims:$PATH

CMD [ "irb" ]
45 changes: 45 additions & 0 deletions .docker/ruby-jemalloc.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## REGISTRY CONFIGURATION ######################################################

ARG REGISTRY="docker.io"

## BUILDER #####################################################################

FROM ${REGISTRY}/essentialkaos/oraclelinux:8 as installer

ARG RUBY_VERSION=3.2.0
ARG WITH_STATIC=no

RUN dnf -y -q install https://yum.kaos.st/kaos-repo-latest.el8.noarch.rpm && \
dnf -y -q install rbenv rbinstall libyaml jemalloc && \
dnf -y -q module disable "*" && dnf clean all && rm -rf /var/cache/dnf /var/log/dnf.* && \
rbinstall ${RUBY_VERSION}-jemalloc --no-progress && \
if [ "${WITH_STATIC}" != "no" ] ; then rm -f /usr/local/rbenv/versions/${RUBY_VERSION}/lib/libruby-static.a ; fi

## FINAL IMAGE ################################################################

FROM ${REGISTRY}/essentialkaos/oraclelinux:8

ARG RUBY_VERSION=3.2.0
ARG WITH_GCC=no

LABEL org.opencontainers.image.title="rbinstall-ruby" \
org.opencontainers.image.description="RBEnv with prebuilt Ruby" \
org.opencontainers.image.vendor="ESSENTIAL KAOS" \
org.opencontainers.image.authors="Anton Novojilov" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.url="https://kaos.sh/rbinstall" \
org.opencontainers.image.source="https://github.com/essentialkaos/rbinstall"

COPY --from=installer /usr/local/rbenv/versions/${RUBY_VERSION}-jemalloc \
/usr/local/rbenv/versions/${RUBY_VERSION}-jemalloc

RUN dnf -y -q install https://yum.kaos.st/kaos-repo-latest.el8.noarch.rpm && \
dnf -y -q install rbenv libyaml jemalloc && \
if [ "${WITH_GCC}" != "no" ] ; then dnf -y -q install gcc ; fi && \
dnf -y -q module disable "*" && dnf clean all && rm -rf /var/cache/dnf /var/log/dnf.* && \
source /etc/profile.d/rbenv.sh && \
rbenv global ${RUBY_VERSION}-jemalloc

ENV PATH /usr/local/rbenv/shims:$PATH

CMD [ "irb" ]
45 changes: 45 additions & 0 deletions .docker/ruby-railsexpress.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## REGISTRY CONFIGURATION ######################################################

ARG REGISTRY="docker.io"

## BUILDER #####################################################################

FROM ${REGISTRY}/essentialkaos/oraclelinux:8 as installer

ARG RUBY_VERSION=3.2.0
ARG WITH_STATIC=no

RUN dnf -y -q install https://yum.kaos.st/kaos-repo-latest.el8.noarch.rpm && \
dnf -y -q install rbenv rbinstall libyaml && \
dnf -y -q module disable "*" && dnf clean all && rm -rf /var/cache/dnf /var/log/dnf.* && \
rbinstall ${RUBY_VERSION}-railsexpress --no-progress && \
if [ "${WITH_STATIC}" != "no" ] ; then rm -f /usr/local/rbenv/versions/${RUBY_VERSION}/lib/libruby-static.a ; fi

## FINAL IMAGE ################################################################

FROM ${REGISTRY}/essentialkaos/oraclelinux:8

ARG RUBY_VERSION=3.2.0
ARG WITH_GCC=no

LABEL org.opencontainers.image.title="rbinstall-ruby" \
org.opencontainers.image.description="RBEnv with prebuilt Ruby" \
org.opencontainers.image.vendor="ESSENTIAL KAOS" \
org.opencontainers.image.authors="Anton Novojilov" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.url="https://kaos.sh/rbinstall" \
org.opencontainers.image.source="https://github.com/essentialkaos/rbinstall"

COPY --from=installer /usr/local/rbenv/versions/${RUBY_VERSION}-railsexpress \
/usr/local/rbenv/versions/${RUBY_VERSION}-railsexpress

RUN dnf -y -q install https://yum.kaos.st/kaos-repo-latest.el8.noarch.rpm && \
dnf -y -q install rbenv libyaml && \
if [ "${WITH_GCC}" != "no" ] ; then dnf -y -q install gcc ; fi && \
dnf -y -q module disable "*" && dnf clean all && rm -rf /var/cache/dnf /var/log/dnf.* && \
source /etc/profile.d/rbenv.sh && \
rbenv global ${RUBY_VERSION}-railsexpress

ENV PATH /usr/local/rbenv/shims:$PATH

CMD [ "irb" ]
45 changes: 45 additions & 0 deletions .docker/ruby.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## REGISTRY CONFIGURATION ######################################################

ARG REGISTRY="docker.io"

## BUILDER #####################################################################

FROM ${REGISTRY}/essentialkaos/oraclelinux:8 as installer

ARG RUBY_VERSION=3.2.0
ARG WITH_STATIC=no

RUN dnf -y -q install https://yum.kaos.st/kaos-repo-latest.el8.noarch.rpm && \
dnf -y -q install rbenv rbinstall libyaml && \
dnf -y -q module disable "*" && dnf clean all && rm -rf /var/cache/dnf /var/log/dnf.* && \
rbinstall ${RUBY_VERSION} --no-progress && \
if [ "${WITH_STATIC}" != "no" ] ; then rm -f /usr/local/rbenv/versions/${RUBY_VERSION}/lib/libruby-static.a ; fi

## FINAL IMAGE ################################################################

FROM ${REGISTRY}/essentialkaos/oraclelinux:8

ARG RUBY_VERSION=3.2.0
ARG WITH_GCC=no

LABEL org.opencontainers.image.title="rbinstall-ruby" \
org.opencontainers.image.description="RBEnv with prebuilt Ruby" \
org.opencontainers.image.vendor="ESSENTIAL KAOS" \
org.opencontainers.image.authors="Anton Novojilov" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.url="https://kaos.sh/rbinstall" \
org.opencontainers.image.source="https://github.com/essentialkaos/rbinstall"

COPY --from=installer /usr/local/rbenv/versions/${RUBY_VERSION} \
/usr/local/rbenv/versions/${RUBY_VERSION}

RUN dnf -y -q install https://yum.kaos.st/kaos-repo-latest.el8.noarch.rpm && \
dnf -y -q install rbenv libyaml && \
if [ "${WITH_GCC}" != "no" ] ; then dnf -y -q install gcc ; fi && \
dnf -y -q module disable "*" && dnf clean all && rm -rf /var/cache/dnf /var/log/dnf.* && \
source /etc/profile.d/rbenv.sh && \
rbenv global ${RUBY_VERSION}

ENV PATH /usr/local/rbenv/shims:$PATH

CMD [ "irb" ]
17 changes: 16 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

strategy:
matrix:
go: [ '1.17.x', '1.18.x' ]
go: [ '1.18.x', '1.19.x' ]

steps:
- name: Set up Go
Expand Down Expand Up @@ -60,3 +60,18 @@ jobs:
uses: essentialkaos/perfecto-action@v2
with:
files: common/rbinstall.spec

Hadolint:
name: Hadolint
runs-on: ubuntu-latest

needs: Go

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Check dockerfiles with Hadolint
uses: essentialkaos/hadolint-action@v1
with:
files: .docker/ruby.docker .docker/ruby-jemalloc.docker .docker/ruby-railsexpress.docker .docker/jruby.docker
4 changes: 4 additions & 0 deletions .hadolint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ignored:
- DL3031
- DL3041
- SC1091
23 changes: 2 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,17 @@

### Usage demo

[![demo](https://gh.kaos.st/rbinstall-200.gif)](#usage-demo)
[![demo](https://gh.kaos.st/rbinstall-300.gif)](#usage-demo)

### Installation

#### From [ESSENTIAL KAOS Public Repository](https://yum.kaos.st)

```bash
sudo yum install -y https://yum.kaos.st/get/$(uname -r).rpm
sudo yum install -y https://yum.kaos.st/kaos-repo-latest.el$(grep 'CPE_NAME' /etc/os-release | tr -d '"' | cut -d':' -f5).noarch.rpm
sudo yum install rbinstall
```

#### Using `install.sh`
We provide simple bash script `install.sh` for installing the application from the sources.

```bash
# install rbenv, golang and latest 7zip
# set GOPATH

git clone https://kaos.sh/rbinstall.git
cd rbinstall

sudo ./install.sh
```

If you have some issues with installing, try to use script in debug mode:

```bash
sudo ./install.sh --debug
```

### Usage
```
Usage: rbinstall {options} version
Expand Down
Loading

0 comments on commit ba6d57c

Please sign in to comment.