FROM gendosu/ruby:2.4-alpine

LABEL maintainer "Tim Lianov lianovt@gmail.com"

# skip installing gem documentation

# RUN set -ex \
# 	\
# 	&& apk add --no-cache --virtual .ruby-builddeps \
# 		autoconf \
# 		bison \
# 		bzip2 \
# 		bzip2-dev \
# 		ca-certificates \
# 		coreutils \
# 		gcc \
# 		gdbm-dev \
# 		glib-dev \
# 		libc-dev \
# 		libffi-dev \
# 		libxml2-dev \
# 		libxslt-dev \
# 		make \
# 		ncurses-dev \
# 		openssl \
# 		openssl-dev \
# 		procps \
# 		readline-dev \
# 		ruby \
# 		tar \
# 		yaml-dev \
# 		zlib-dev \
# 		xz


RUN set -ex \
	\
	&& apk update && apk add --no-cache --virtual .ruby-builddeps \
		coreutils \
		linux-headers \
		build-base \
		libxml2 \
		libxml2-dev \
		libcurl \
		curl-dev

#ENV RUBYGEMS_VERSION 2.6.10
RUN gem update

#ENV BUNDLER_VERSION 2.2.16
RUN gem install bundler
#--version "$BUNDLER_VERSION"

ADD /devops-service/ /app/
WORKDIR /app
RUN bundle install

