Skip to content

Commit

Permalink
Initial version of docker config for testing rspec on ubuntu.
Browse files Browse the repository at this point in the history
  • Loading branch information
edporras committed May 13, 2019
1 parent c502737 commit c6d95fd
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM buildpack-deps:stretch
MAINTAINER github@digressed.net

ENV LC_ALL C.UTF-8

# Update Ubuntu Software repository
RUN apt-get update

# install dependencies & utils
RUN apt-get install -y \
libicu-dev \
curl \
libreadline-dev

# aliases, environment
RUN echo 'alias h="history"' >> /root/.bashrc
RUN echo 'alias be="bundle exec"' >> /root/.bashrc
ENV PATH "/root/.rbenv/bin:/root/.rbenv/shims:$PATH"

# install rbenv & ruby
RUN \curl -sL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer | bash -
RUN eval "$(rbenv init -)"

ENV RUBY_VERSION=2.6.3
RUN rbenv install ${RUBY_VERSION}
RUN rbenv global ${RUBY_VERSION}

# mute bundle warning about root user
RUN bundle config --global silence_root_warning 1

WORKDIR /gem

# cleanup
RUN rm -rf /var/lib/apt/lists/*
11 changes: 11 additions & 0 deletions bin/build_docker_image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -e

if [[ $# -ne 1 ]]; then
RUBY_VERSION=2.6.3
else
RUBY_VERSION=$1
fi

docker build -t edn_turbo_image:$RUBY_VERSION .
5 changes: 5 additions & 0 deletions bin/console.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -e

docker-compose run edn_turbo /bin/bash
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3"
services:

edn_turbo:
image: edn_turbo_image:2.6.3
stdin_open: true
tty: true
volumes:
- ~/.bash_history:/root/.bash_history
- /Volumes/homes/ep/work/edn_turbo:/gem

0 comments on commit c6d95fd

Please sign in to comment.