Last active
September 4, 2019 13:31
-
-
Save helstern/99f858c04264b71de157579b9f0f1809 to your computer and use it in GitHub Desktop.
Revisions
-
helstern revised this gist
Sep 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ PROJECT_NAME := $(basename $(PROJECT_ROOT)) docker-build-2.5: docker build --tag rhelstern-ruby:2.5.5 --file ruby-2.5.Dockerfile . docker-build-2.3: docker build --tag rhelstern-ruby:2.3.3 --file ruby-2.3.Dockerfile . docker-run-2.5: -
helstern created this gist
Sep 4, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) PROJECT_ROOT := $(dir $(mkfile_path)) PROJECT_NAME := $(basename $(PROJECT_ROOT)) docker-build-2.5: docker build --tag rhelstern-ruby:2.5.5 --file ruby-2.5.Dockerfile . docker-build-2.5: docker build --tag rhelstern-ruby:2.3.3 --file ruby-2.3.Dockerfile . docker-run-2.5: docker run --rm \ --network host \ --volume ${PROJECT_ROOT}:/home/ruby/${PROJECT_NAME} \ --volume $$HOME/.ssh:/home/ruby/.ssh \ -w=/home/ruby/${PROJECT_NAME} \ --user 1000 \ -it rhelstern-ruby:2.5.5 \ /bin/bash docker-run-2.3: docker run --rm \ --network host \ --volume ${PROJECT_ROOT}:/home/ruby/${PROJECT_NAME} \ --volume $$HOME/.ssh:/home/ruby/.ssh \ -w=/home/ruby/${PROJECT_NAME} \ --user 1000 \ -it rhelstern-ruby:2.3.3 \ /bin/bash .PHONY: docker-run-2.5 docker-run-2.3 docker-build-2.5 docker-build-2.3 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ FROM ruby:2.3.3-alpine RUN apk add --no-cache bash gawk sed grep bc coreutils git less openssh curl jq RUN addgroup -g 1000 ruby \ && adduser \ -S \ -h /home/ruby \ -G ruby \ -u 1000 \ ruby RUN apk add --no-cache \ # gem 'oj', 'puma', 'byebug' make gcc libc-dev \ # gem 'nokogiri' # bundle config --global build.nokogiri --use-system-libraries && \ # apk --no-cache add make libxml2 libxslt-dev g++ && \ make libxml2 libxslt-dev g++ \ # gem 'rb-readline' ncurses \ # gem 'ffi' libffi-dev \ # gem 'mysql2' mysql-dev \ # gem 'unf_ext' g++ \ # gem 'tiny_tds' freetds-dev \ # if you want to run git or something that requires ssl dependencies ca-certificates git \ alpine-sdk build-base # we don't want bundler > 2, perhaps should go with gem install bundler -v '< 2' RUN gem uninstall -i /usr/local/lib/ruby/gems/2.3.0 --force bundler; gem install bundler -v '1.17.3' This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,41 @@ FROM ruby:2.5.5-alpine3.10 RUN apk add --no-cache bash gawk sed grep bc coreutils git less openssh curl jq \ && addgroup --gid 1000 ruby \ && adduser \ --disabled-password \ --gecos "" \ --home /home/ruby \ --ingroup ruby \ --uid 1000 \ ruby RUN gem uninstall --force bundler RUN \ # gem 'oj', 'puma', 'byebug' apk add --no-cache make gcc libc-dev && \ # gem 'nokogiri' bundle config --global build.nokogiri --use-system-libraries && \ apk add --no-cache make libxml2 libxslt-dev g++ && \ # gem 'rb-readline' apk add --no-cache ncurses && \ # gem 'ffi' apk add --no-cache libffi-dev && \ # gem 'mysql2' apk add --no-cache mysql-dev && \ # gem 'unf_ext' apk add --no-cache g++ && \ # gem 'tiny_tds' apk add --no-cache freetds-dev && \ # app dependencies apk add --no-cache ca-certificates git && \ apk add --no-cache alpine-sdk build-base