Skip to content

Commit

Permalink
Update the Dockerfile following the Awestruct upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
yrodiere committed Feb 2, 2018
1 parent f133162 commit f106f85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
3 changes: 2 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ desc 'Build and preview the site locally in development mode. preview[<options>]
task :preview, [:profile, :options] => :init do |task, args|
profile = get_profile args
options = args[:options]
run_awestruct "-P #{profile} --server --auto --no-livereload #{options}"
# Must bind to 0.0.0.0 instead of the default "localhost" in order to allow port forwarding in Docker container
run_awestruct "-P #{profile} --server --bind 0.0.0.0 --auto --no-livereload #{options}"
end

desc 'Generate the site using the specified profile, default is \'development\'. Additional options can also be specified, eg \'gen[development, \'-w\']'
Expand Down
11 changes: 4 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM fedora:22
FROM fedora:27

# install the required dependencies to complile natice extensions
RUN dnf -y install gcc-c++ make ruby-devel libxml2-devel libxslt-devel findutils git ruby
RUN dnf makecache
RUN dnf -y install gcc-c++ make ruby-devel libxml2-devel libxslt-devel findutils git ruby tar redhat-rpm-config

RUN groupadd -r dev && useradd -g dev -u 1000 dev
RUN mkdir -p /home/dev
Expand All @@ -23,13 +24,9 @@ RUN mkdir $HOME/.gems
RUN gem install -N rake bundler

# Clone hibernate.org in order to run the setup task
RUN git clone https://github.com/hibernate/in.relation.to.git $HOME/hibernate.org
RUN git clone https://github.com/hibernate/hibernate.org.git $HOME/hibernate.org
RUN cd $HOME/hibernate.org && git checkout production && rake setup

# We need to patch awestruct to make auto generation work. On mounted volumes file
# change montoring will only work with polling
RUN gem contents awestruct | grep auto.rb | xargs sed -i "s/^\(.*force_polling =\).*/\1 true/"

EXPOSE 4242
VOLUME $HOME/hibernate.org
WORKDIR $HOME/hibernate.org
Expand Down

0 comments on commit f106f85

Please sign in to comment.