Last active
October 9, 2016 23:34
-
-
Save matthewjackowski/4e140c72b842af420afe to your computer and use it in GitHub Desktop.
Revisions
-
Matthew Jackowski revised this gist
Mar 21, 2016 . 1 changed file with 18 additions and 39 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,52 +1,31 @@ FROM alpine:3.3 MAINTAINER Matthew Jackowski <[email protected]> # Update and install all of the required packages. # At the end, remove the apk cache RUN apk update && \ apk upgrade && \ apk add bash curl-dev ruby-dev build-base && \ apk add ruby ruby-io-console ruby-bundler && \ rm -rf /var/cache/apk/* VOLUME /tmp/txgh RUN mkdir /usr/app WORKDIR /usr/app COPY Gemfile /usr/app/ COPY Gemfile.lock /usr/app/ RUN bundle install COPY . /usr/app ENV RACK_ENV development ENV GITHUB_PUSH_SOURCE_TO Transifex Project Name ENV GITHUB_USERNAME Your github username ENV GITHUB_TOKEN Transifex API Token ENV GITHUB_WEBHOOK_SECRET Auth for Github Webhook ENV GITHUB_BRANCH master ENV TX_CONFIG_PATH /tmp/txgh/tx.config ENV TX_USERNAME Transifex Username ENV TX_PASSWORD Transifex Password ENV TX_PUSH_TRANSLATIONS_TO Github Repo Name -
Matthew Jackowski created this gist
Mar 21, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,56 @@ FROM buildpack-deps:jessie # skip installing gem documentation RUN mkdir -p /usr/local/etc \ && { \ echo 'install: --no-document'; \ echo 'update: --no-document'; \ } >> /usr/local/etc/gemrc # some of ruby's build scripts are written in ruby # we purge this later to make sure our final image uses what we just built RUN set -ex \ && buildDeps=' \ bison \ libgdbm-dev \ ruby \ ' \ && apt-get update \ && apt-get install -y --no-install-recommends $buildDeps \ && rm -rf /var/lib/apt/lists/* \ && curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.8.tar.gz" \ && echo "afd832b8d5ecb2e3e1477ec6a9408fdf9898ee73e4c5df17a2b2cb36bd1c355d *ruby.tar.gz" | sha256sum -c - \ && mkdir -p /usr/src/ruby \ && tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \ && rm ruby.tar.gz \ && cd /usr/src/ruby \ && { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new && mv file.c.new file.c \ && autoconf \ && ./configure --disable-install-doc \ && make -j"$(nproc)" \ && make install \ && apt-get purge -y --auto-remove $buildDeps \ && gem update --system 2.6.2 \ && rm -r /usr/src/ruby RUN gem install bundler --version "1.11.2" ENV PATH /usr/local/bundle/bin:$PATH RUN mkdir -p "/usr/local/bundle" "/usr/local/bundle/bin" \ && chmod 777 "/usr/local/bundle" "/usr/local/bundle/bin" CMD [ "irb" ] ENV RACK_ENV production ENV GITHUB_PUSH_SOURCE_TO Transifex Project Name ENV GITHUB_USERNAME Your github username ENV GITHUB_TOKEN Transifex API Token ENV GITHUB_WEBHOOK_SECRET Auth for Github Webhook ENV GITHUB_BRANCH master ENV TX_CONFIG_PATH config/tx.config ENV TX_USERNAME Transifex Username ENV TX_PASSWORD Transifex Password ENV TX_PUSH_TRANSLATIONS_TO Github Repo Name ENV TX_WEBHOOK_SECRET Auth for Transifex Webhook EXPOSE 9292 CMD ["puma", "-p", "9292"]