Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ruby slim stretch #1

Merged
merged 4 commits into from
Apr 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.env
diaspora.docker
46 changes: 11 additions & 35 deletions Dockerfile.diaspora
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM debian:stretch as base
FROM ruby:2.4.4-slim-stretch

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y -qq \
build-essential \
libssl-dev \
libcurl4-openssl-dev \
libidn11-dev \
libxml2-dev \
libxslt-dev \
imagemagick \
Expand All @@ -16,20 +17,6 @@ RUN apt-get update \
libpq-dev \
cmake \
nodejs \
# Packages for RVM
gawk \
libyaml-dev \
libsqlite3-dev \
sqlite3 \
autoconf \
libgmp-dev \
libgdbm-dev \
libncurses5-dev \
automake \
bison \
libffi-dev \
libgmp-dev \
libreadline-dev \
&& rm -rf /var/lib/apt/lists/*

ARG EXT_UID
Expand All @@ -38,26 +25,15 @@ RUN addgroup --system --gid ${EXT_GID} diaspora
RUN adduser --system --uid ${EXT_UID} --gid ${EXT_GID} diaspora

USER diaspora
RUN mkdir /home/diaspora/diaspora
WORKDIR /home/diaspora/diaspora

# Install RVM + Ruby
ENV LANG=C.UTF8

RUN curl -sSL https://rvm.io/mpapis.asc | gpg --import - \
&& curl -L https://s.diaspora.software/1t | bash \
&& rm -rf ~/.gnupg
SHELL ["/bin/bash", "--login", "-c"]

RUN rvm install 2.4

# Install bundler
RUN echo diaspora > .ruby-gemset \
&& echo 2.4 > .ruby-version \
&& touch Gemfile \
&& cd ../diaspora \
&& gem install bundler \
&& rm .ruby-* Gemfile
ENV DIASPORA_HOME /home/diaspora/diaspora
RUN mkdir $DIASPORA_HOME
WORKDIR $DIASPORA_HOME

ENV GEM_HOME $DIASPORA_HOME/vendor/bundle
ENV BUNDLE_PATH="$GEM_HOME" \
BUNDLE_BIN="$GEM_HOME/bin" \
BUNDLE_APP_CONFIG="$DIASPORA_HOME/.bundle"
ENV PATH $BUNDLE_BIN:$PATH

# Finish setup
COPY ./start.sh ../start.sh
Expand Down
1 change: 0 additions & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

action_install_gems() {
script/configure_bundler
bin/bundle config --local path vendor/bundle
bin/bundle install --full-index
}

Expand Down