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

fix: docker build failures #447

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
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
26 changes: 8 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,9 @@ USER dev
# Environment variables

ENV HOME /home/dev
ENV RUBY_VERSION 2.3.1
ENV RUBY_VERSION 2.4.3

### Not released yet - but keeping it here for further simplification
ENV AWESTRUCT_VERSION 0.6.0

# Used for custom build
ENV AWESTRUCT_REPO https://github.com/awestruct/awestruct.git
ENV AWESTRUCT_REPO_DIR $HOME/awestruct
ENV AWESTRUCT_COMMIT 00a88d44efcfad33cdec8b09f0d8cd9bd4650e06
ENV AWESTRUCT_VERSION 0.6.1

# Fix encoding
ENV LANG en_US.UTF-8
Expand All @@ -59,23 +53,19 @@ ENV LANGUAGE en_US.UTF-8
WORKDIR $HOME

RUN gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
# workaround for https://github.com/rvm/rvm/issues/4068
RUN curl -sSL https://raw.githubusercontent.com/wayneeseguin/rvm/stable/binscripts/rvm-installer | /bin/bash -s stable --ruby=$RUBY_VERSION
RUN gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
RUN curl -sSL https://get.rvm.io | bash -s stable --ruby=$RUBY_VERSION
RUN bash -l -c "rvm use $RUBY_VERSION"
RUN bash -l -c "rvm cleanup all"
# Install Rake and Bundler for driving the Awestruct build & site
RUN bash -l -c "gem install -N bundler rake"

# Run custom Awestuct build until v0.6.0 is released
RUN bash -l -c "git clone $AWESTRUCT_REPO $AWESTRUCT_REPO_DIR"
RUN bash -l -c "cd $AWESTRUCT_REPO_DIR && git checkout $AWESTRUCT_COMMIT && gem build awestruct.gemspec"
RUN bash -l -c "gem install $AWESTRUCT_REPO_DIR/awestruct-0.6.0.alpha.gem --no-rdoc --no-ri"

RUN echo 'alias install-gems="bundle install -j 10 --path ./.gems"' >> $HOME/.bashrc
RUN bundle config set path './.gems'
RUN echo 'alias install-gems="bundle install -j 10"' >> $HOME/.bashrc
RUN source $HOME/.bashrc

# Once released
# RUN bash -l -c "gem install awestruct -v $AWESTRUCT_VERSION --no-rdoc --no-ri"
# Install Awestruct
RUN bash -l -c "gem install awestruct -v $AWESTRUCT_VERSION"

EXPOSE 4242

Expand Down
4 changes: 1 addition & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@

source 'https://rubygems.org'

#gem 'awestruct', '0.5.7'
gem 'awestruct', :path => '../awestruct'
#gem 'awestruct', :git => '[email protected]:awestruct/awestruct.git'
gem 'awestruct', '0.6.1'
gem 'git', '1.2.9.1' # newer version incorrectly reads UTF-8 enconded commits (authors for example)
gem 'asciidoctor'
gem 'haml-contrib'
Expand Down
2 changes: 1 addition & 1 deletion _ext/pipeline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
extension Awestruct::Extensions::Identities::Cache.new

# Transformers
transformer Awestruct::Extensions::Minify.new([:js])
#transformer Awestruct::Extensions::Minify.new([:js])
transformer Awestruct::Extensions::Guide::WrapHeaderAndAssignHeadingIds.new

# Helpers
Expand Down