Skip to content

Commit

Permalink
docker support for running awestruct.
Browse files Browse the repository at this point in the history
How to use:
  install docker, run:

  $ cd jbosstools-website
  $ docker build -t jbosstools-website  .

  This will run the full docker build (takes a while the first time).

  Now you can just run

  $ docker run -it --rm -p 4242:4242 -v `pwd`:/jbosstools-website -t jbosstools-website

  And it will run awestruct in isolation but on top of your changes in jbosstools-website.

  Content will be available at http://${DOCKER_HOST}:4242
  • Loading branch information
maxandersen committed Nov 14, 2014
1 parent 84750c7 commit c9b9224
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 23 deletions.
22 changes: 22 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# exclude everything from Docker except gemfile's that specify dependencies needed.
.git
_*/*
*.haml
*.adoc
*.properties
Font
Guardfile
blog
cache
cat
community
documentation
downloads
events
features
fonts
getinvolved
images
javascripts
stylesheets
usage
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-1.9.3-p484
ruby-1.9.3-p547
8 changes: 0 additions & 8 deletions .rvmrc

This file was deleted.

49 changes: 49 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
FROM centos:centos7
MAINTAINER Max Rydahl Andersen <max@jboss.org>

# install deps required by our build
RUN yum install -y epel-release which tar bzip2 gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel libcurl-devel git

# when running with above nodejs was not available
RUN yum install -y nodejs

# Add RVM keys
RUN gpg2 --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3

# Install RVM
RUN curl -L get.rvm.io | bash -s stable
RUN /bin/bash -l -c "rvm requirements && rvm autolibs enable"

# Install Ruby
ADD ./.ruby-version /tmp/
ADD ./.ruby-gemset /tmp/
RUN /bin/bash -l -c "rvm install `cat /tmp/.ruby-version`"

## Build setup
# Build the current gemset (user will only need to build the difference
ADD ./Gemfile /tmp/
ADD ./Gemfile.lock /tmp/
ADD ./Rakefile /tmp/
WORKDIR /tmp/
RUN /bin/bash -l -c "bundle install"

# Enable GPG support
VOLUME /gnupg
ENV GNUPGHOME /gnupg
RUN touch /tmp/gpg-agent.conf
RUN echo 'export GPG_TTY=$(tty); eval $(gpg-agent --daemon --no-use-standard-socket --options /tmp/gpg-agent.conf );' >> ~/.bash_profile

# Add the volume for the actual project
VOLUME /jbosstools-website
WORKDIR /jbosstools-website

# Prevent encoding errors
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8

EXPOSE 4242

ENTRYPOINT [ "/bin/bash", "-l", "-c" ]
CMD [ "rake", "setup", "preview" ]

14 changes: 0 additions & 14 deletions central-news-1.2.1.Alpha2.adoc

This file was deleted.

0 comments on commit c9b9224

Please sign in to comment.