mirror of
https://gitee.com/kennylee/docker.git
synced 2024-11-29 18:38:34 +08:00
29 lines
851 B
Plaintext
Executable File
29 lines
851 B
Plaintext
Executable File
# Ruby
|
|
#
|
|
# https://github.com/docker-library/ruby
|
|
#
|
|
# Pull base image.
|
|
FROM ruby:2.6-alpine
|
|
|
|
MAINTAINER kennylee <kennylee26@gmail.com>
|
|
|
|
# 使用阿里云镜像
|
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
|
|
|
# Install base packages
|
|
RUN apk --no-cache update && \
|
|
apk --no-cache upgrade && \
|
|
apk --no-cache add curl bash tzdata tar unzip && \
|
|
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
|
echo "Asia/Shanghai" > /etc/timezone && \
|
|
echo -ne "Alpine Linux 3.9 image. (`uname -rsv`)\n" >> /root/.built && \
|
|
rm -fr /tmp/* /var/cache/apk/*
|
|
|
|
# FIX Ruby RESOURCE
|
|
RUN bundle config mirror.https://rubygems.org https://gems.ruby-china.com
|
|
RUN gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
|
|
RUN gem sources -l
|
|
|
|
# Define default command.
|
|
CMD [ "irb" ]
|