Sign inSign up

7a6163/geminabox

By 7a6163

Updated about 2 years ago

Docker image of Gem in a Box.

Image
Developer tools
Web servers
0

9.4K

7a6163/geminabox repository overview

GitHub Actions Workflow Status Docker Image Size (latest by date)

Docker image of Gem in a Box

Overview

Geminabox lets you host your own gems, and push new gems to it just like with rubygems.org. This docker image include Geminabox on runtime of the official ruby:3.2-alpine.

Usage

Quick start

Do mapping local port to listening 9292 port on the container, which activate geminabox. In order to open local port 8080 up to container, docker run command as follows.

docker run -d -p 8080:9292 7a6163/geminabox:latest

After executing the command, you can browse geminabox where http://localhost:8080.
Then, executing the follwing command enables gem networking your own geminabox.

gem sources -a http://localhost:8080/

Finally, you can upload or delete gems through browsing geminabox, and install gems by cli like as follows.

gem install GEM
Options

Configure two environment variables activate basic authentication. Default inactive. After activate Basic authentication, you need authentication when upload or delete gems.

BASIC_USER

username for basic authentication.

BASIC_PASS

password for basic authentication.

Docker run command as follows.

docker run -d -p 8080:9292 -e BASIC_USER=username -e BASIC_PASS=password 7a6163/geminabox:latest

And in order to enabling auto authentication when you install gems on cli, you should run the command.

gem sources -a http://username:password@localhost:8080/

Configurations

persistent volume for gems

Gems are stored on the directory /var/geminabox-data on the geminabox container. So, mount a directory on the host or a docker volume to /var/geminabox-data, gems persists. For example, mount current directory,

docker run -d -p 8080:9292 --mount type=bind,src=$PWD,dst=/var/geminabox-data 7a6163/geminabox:latest
docker-compose.yml

Basic Authentication is activated and docker volume mounted to persist gems.

version: '3.7'

services:
  geminabox:
    image: 7a6163/geminabox:latest
    container_name: geminabox
    environment:
      - BASIC_USER=username
      - BASIC_PASS=password
    ports:
      - "8080:9292"
    restart: always
    volumes:
      - type: volume
        source: geminabox-data
        target: /var/geminabox-data

volumes:
  geminabox-data:

Tag summary

Content type

Image

Digest

sha256:05db915b2

Size

45.2 MB

Last updated

about 2 years ago

docker pull 7a6163/geminabox