Switch to Alpine

This commit is contained in:
Mahmoud Hossam 2019-01-17 09:41:51 +02:00 committed by Nemo
parent 41c6c3eff2
commit de9ad69717
1 changed files with 18 additions and 20 deletions

View File

@ -1,29 +1,27 @@
# LTS Image
FROM ubuntu:18.04
FROM ruby:alpine
LABEL maintainer="github.google-sre-ebook@captnemo.in"
ARG DEBIAN_FRONTEND="noninteractive"
RUN apk add \
build-base \
linux-headers \
wget \
bash
# Install pandoc
RUN wget -nv https://github.com/jgm/pandoc/releases/download/2.5/pandoc-2.5-linux.tar.gz \
&& tar xzf pandoc-2.5-linux.tar.gz --strip-components 1 -C /usr/local \
&& rm pandoc-2.5-linux.tar.gz
COPY Gemfile* /tmp/
WORKDIR /tmp
RUN gem install bundler --no-document \
&& bundle install
WORKDIR /src
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
calibre \
pandoc \
ruby \
ruby-dev \
wget \
zlib1g-dev \
file \
&& gem install bundler --no-ri --no-rdoc \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY . /src/
RUN bundle install
ENTRYPOINT ["/src/bootstrap.sh", "docker"]
VOLUME ["/output"]