因为github无耻的拒绝了百度对gitpage的抓取和收录,故此自己只做了个jekyll环境跑gitpage的blog,只为收录。。。
centos6:jekyll
Dockerfile
# Create by Xie Xianbin, For Jekyll Dockerfile
# v 0.0.1
# base image
FROM xiexianbin/centos6:base
# remark
MAINTAINER Xie Xianbin "xianbinxie@163.com"
# Dockerfile build cache
ENV REFRESHED_AT 2015-11-29
# for base env
RUN rm -rf /etc/yum.repos.d/*
COPY Centos-6.repo /etc/yum.repos.d/
RUN rpm -ivh http://mirrors.zju.edu.cn/epel/6/i386/epel-release-6-8.noarch.rpm
RUN yum clean all
RUN yum -y install gcc git wget curl vim tar
# for jekyll env
RUN yum install nodejs libyaml -y
COPY ruby-1.9.3p545-1.el6.x86_64.rpm /opt/
RUN rpm -ivh /opt/ruby-1.9.3p545-1.el6.x86_64.rpm
RUN rm -rf /opt/ruby-1.9.3p545-1.el6.x86_64.rpm
RUN gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/
RUN gem install jekyll --version "=1.4.2"
RUN gem install kramdown
RUN yum clean all
RUN history -c
EXPOSE 8080
ENTRYPOINT ["/bin/bash"]
Dockerfile 目录文件详情
[root@xianbin docker]# pwd
/root/docker/docker
[root@xianbin docker]# ll
total 18660
-rw-r--r-- 1 root root 2572 Nov 30 01:18 Centos-6.repo
-rw-r--r-- 1 root root 823 Nov 30 01:18 Dockerfile
-rw-r--r-- 1 root root 19098152 Nov 30 01:21 ruby-1.9.3p545-1.el6.x86_64.rpm
Docker相关文件下载地址:http://pan.baidu.com/s/1o6J7UDc
Docker build 命令
docker build -t xiexianbin/centos6:jekyll .
登录Docker Hub
[root@iZ288u02izdZ ~]# docker login
Username: xiexianbin
Password:
Email: me@xiexianbin.cn
WARNING: login credentials saved in /root/.dockercfg.
Login Succeeded
[root@iZ288u02izdZ ~]#
docker push
docker push xiexianbin/centos6:jekyll
centos6:jekyll
Dockerfile 目录文件详情
[root@xiexianbin_cn docker]# ll
total 15092
-rw-r--r-- 1 root root 2573 Oct 23 13:52 Centos-7.repo
-rw-r--r-- 1 root root 742 Oct 23 13:52 Dockerfile
-rw-r--r-- 1 root root 201 Oct 23 13:52 Gemfile
-rw-r--r-- 1 root root 80732 Oct 23 13:52 libuv-1.9.1-1.el7.x86_64.rpm
-rw-r--r-- 1 root root 4796624 Oct 23 13:53 nodejs-6.9.1-1.el7.x86_64.rpm
-rw-r--r-- 1 root root 2563156 Oct 23 13:53 npm-3.10.8-1.6.9.1.1.el7.x86_64.rpm
-rw-r--r-- 1 root root 4718592 Oct 23 13:54 ruby-2.3.1-1.el7.centos.x86_64.rpm
-rw-r--r-- 1 root root 3276800 Oct 23 13:54 ruby-debuginfo-2.3.1-1.el7.centos.x86_64.rpm
[root@xiexianbin_cn docker]#
相关文件:下载地址
Docker build 命令
docker build -t xiexianbin/centos7:jekyll .
docker build 过程
docker build -t xiexianbin/centos7:jekyll .
登录Docker Hub
[root@xiexianbin_cn ~]# docker login
Username: xiexianbin
Password:
Email: me@xiexianbin.cn
WARNING: login credentials saved in /root/.dockercfg.
Login Succeeded
[root@xiexianbin_cn ~]#
docker push
docker push xiexianbin/centos7:jekyll