<commit_before># Version 0.0.1
# build
# sudo docker build -t yonh/sblog
# run
# sudo docker run -d --name sblog -p 4508:80 yonh/sblog
# sudo docker run -it --rm -p 4508:80 yonh/blog
# sudo docker run -it --rm -p 4508:80 -v ~/git/sblog/app:/opt/webapp yonh/sblog
# sudo docker run -d --name sblog -p 4508:80 -v ~/git/sblog/app:/opt/webapp yonh/sblog

FROM ubuntu:14.04

#镜像作者和email
MAINTAINER yonh "<EMAIL>"
ENV REFERSHED_AT 2015-05-07

#执行命令，docker会在每条run指令后创建一个新的镜像层
#使用官方源实在是太慢了，下载软件还会失败，更改阿里源作替换
ADD sources.list /etc/apt/sources.list
RUN apt-get update
RUN apt-get -y install ruby ruby-dev make g++ emacs
#移除官方源
#RUN gem sources --remove https://rubygems.org/
#增加http://ruby.taobao.org/源
#RUN gem sources -a https://ruby.taobao.org/
RUN gem install --no-rdoc --no-ri sinatra rqrcode_png thin
#RUN sed -i "s/:DoNotReverseLookup => nil/:DoNotReverseLookup=> true/g" /usr/lib/ruby/1.9.1/webrick/config.rb
ADD app /opt/webapp/
ADD org /opt/org/
RUN mkdir -p /opt/webapp

#公开端口
EXPOSE 80

ADD run.sh /run.sh
RUN chmod +x /run.sh
CMD [ "/run.sh" ]
<commit_msg>更改为官方源<commit_after># Version 0.0.1
# build
# sudo docker build -t yonh/sblog
# run
# sudo docker run -d --name sblog -p 4508:80 yonh/sblog
# sudo docker run -it --rm -p 4508:80 yonh/blog
# sudo docker run -it --rm -p 4508:80 -v ~/git/sblog/app:/opt/webapp yonh/sblog
# sudo docker run -d --name sblog -p 4508:80 -v ~/git/sblog/app:/opt/webapp yonh/sblog

FROM ubuntu:14.04

#镜像作者和email
MAINTAINER yonh "<EMAIL>"
ENV REFERSHED_AT 2015-05-07

#执行命令，docker会在每条run指令后创建一个新的镜像层
#使用官方源实在是太慢了，下载软件还会失败，更改阿里源作替换
#ADD sources.list /etc/apt/sources.list
RUN apt-get update
RUN apt-get -y install ruby ruby-dev make g++ emacs
#移除官方源
#RUN gem sources --remove https://rubygems.org/
#增加http://ruby.taobao.org/源
#RUN gem sources -a https://ruby.taobao.org/
RUN gem install --no-rdoc --no-ri sinatra rqrcode_png thin
#RUN sed -i "s/:DoNotReverseLookup => nil/:DoNotReverseLookup=> true/g" /usr/lib/ruby/1.9.1/webrick/config.rb
ADD app /opt/webapp/
ADD org /opt/org/
RUN mkdir -p /opt/webapp

#公开端口
EXPOSE 80

ADD run.sh /run.sh
RUN chmod +x /run.sh
CMD [ "/run.sh" ]

{'fraction_non_alphanumeric': 0.14630681818181818, 'fraction_numerical': 0.041666666666666664, 'mean_word_length': 3.429769392033543, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2785654', 'n_tokens_mistral': 1059, 'n_tokens_neox': 1014, 'n_words': 246}