Skip to content

Instantly share code, notes, and snippets.

@zhenwusw
Last active May 16, 2017 12:44
Show Gist options
  • Save zhenwusw/f2471486bcd6e1fcd89873980caf4ade to your computer and use it in GitHub Desktop.
Save zhenwusw/f2471486bcd6e1fcd89873980caf4ade to your computer and use it in GitHub Desktop.
#
# Gradle Dockerfile
#
# https://github.com/lukin0110/docker-slanger
#
# Pull base image
# https://hub.docker.com/_/ruby/
FROM ruby:2.3.3-alpine
MAINTAINER zhenwusw <[email protected]>
RUN echo "http://mirrors.aliyun.com/alpine/v3.4/main/" > /etc/apk/repositories
# API: 3456
# WebSocket: 13456
EXPOSE 3456 13456
# Inspiration: http://blog.codeship.com/build-minimal-docker-container-ruby-apps/
ENV BUILD_PACKAGES build-base
# Update and install all of the required packages.
# At the end, remove the apk cache
RUN apk --update add $BUILD_PACKAGES && \
rm -rf /var/cache/apk/*
# Install slanger
RUN gem install slanger -v 0.6.0 --no-ri --no-rdoc
# Start the slanger server
CMD slanger --app_key ${SLANGER_APP_KEY} \
--secret ${SLANGER_SECRET} \
--api_host ${SLANGER_API_ADDR} \
--websocket_host ${SLANGER_WS_ADDR} \
--redis_address ${SLANGER_REDIS_URL} \
--verbose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment