Skip to content

Instantly share code, notes, and snippets.

@matthewjackowski
Last active October 9, 2016 23:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewjackowski/4e140c72b842af420afe to your computer and use it in GitHub Desktop.
Save matthewjackowski/4e140c72b842af420afe to your computer and use it in GitHub Desktop.
An opinionated Docker build for Txgh
FROM alpine:3.3
MAINTAINER Matthew Jackowski <matthew@transifex.com>
# 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
ENV TX_WEBHOOK_SECRET Auth for Transifex Webhook
EXPOSE 9292
CMD ["puma", "-p", "9292"]
@nazar-pc
Copy link

nazar-pc commented Oct 9, 2016

Can this container grab config from .tx/config in Git repository it is integrated with?

@nazar-pc
Copy link

nazar-pc commented Oct 9, 2016

It will also help to rebuild image when new versions of base released to avoid security issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment