Last active
October 9, 2016 23:34
-
-
Save matthewjackowski/4e140c72b842af420afe to your computer and use it in GitHub Desktop.
An opinionated Docker build for Txgh
This file contains 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 characters
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"] |
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
Can this container grab config from
.tx/config
in Git repository it is integrated with?