Skip to content

Commit

Permalink
codis 镜像构造完成
Browse files Browse the repository at this point in the history
  • Loading branch information
supermy committed Aug 23, 2015
1 parent aacddd9 commit 24b2873
Showing 1 changed file with 29 additions and 18 deletions.
47 changes: 29 additions & 18 deletions common/mycodis/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
FROM supermy/docker-debian:7

RUN cat /etc/apt/sources.list

RUN sed -i '1,3d' /etc/apt/sources.list

RUN echo '#' >> /etc/apt/sources.list

RUN sed -i '$a \
deb http://mirrors.163.com/debian/ wheezy main non-free contrib \n \
deb http://mirrors.163.com/debian/ wheezy-proposed-updates main contrib non-free \n \
deb http://mirrors.163.com/debian-security/ wheezy/updates main contrib non-free \n \
deb-src http://mirrors.163.com/debian/ wheezy main non-free contrib \n \
deb-src http://mirrors.163.com/debian/ wheezy-proposed-updates main contrib non-free \n \
deb-src http://mirrors.163.com/debian-security/ wheezy/updates main contrib non-free \n \
\
' /etc/apt/sources.list

RUN cat /etc/apt/sources.list

# gcc for cgo
RUN apt-get update && apt-get install -y \
gcc libc6-dev make \
Expand All @@ -23,35 +42,27 @@ ENV GOPATH /go
ENV PATH /go/bin:$PATH
WORKDIR /go

RUN ls /go/bin
COPY go-wrapper /usr/local/bin/

#### build go end ####

#RUN sed -i '1,3d' /etc/apt/sources.list
#RUN sed -i '4a \
# deb http://mirrors.163.com/debian/ wheezy main non-free contrib \n \
# deb http://mirrors.163.com/debian/ wheezy-proposed-updates main contrib non-free \n \
# deb http://mirrors.163.com/debian-security/ wheezy/updates main contrib non-free \n \
# deb-src http://mirrors.163.com/debian/ wheezy main non-free contrib \n \
# deb-src http://mirrors.163.com/debian/ wheezy-proposed-updates main contrib non-free \n \
# deb-src http://mirrors.163.com/debian-security/ wheezy/updates main contrib non-free \n \
# \
# ' /etc/apt/sources.list


RUN cat /etc/apt/sources.list
#### build codis begin ####

RUN apt-get update -y

RUN apt-get install -y git
RUN apt-get update -y && apt-get install -y git

# Add codis
Add codis /go/src/github.com/wandoulabs/codis/
WORKDIR /go/src/github.com/wandoulabs/codis/

#采用下面的数据源,文件不全编译错误
#RUN git clone https://github.com/wandoulabs/codis
#WORKDIR codis

# Install dependency
RUN ./bootstrap.sh
WORKDIR /go/src/github.com/wandoulabs/codis/sample
#WORKDIR /go/src/github.com/wandoulabs/codis/sample
WORKDIR codis/sample


# Expose ports
EXPOSE 19000
Expand Down

0 comments on commit 24b2873

Please sign in to comment.