1 Star 0 Fork 1.3K

优秀开源项目收集/docker

forked from Kenny小狼/docker 
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Dockerfile 2.83 KB
一键复制 编辑 原始数据 按行查看 历史
KennyLee 提交于 2017-06-23 10:20 +08:00 . 新增golang镜像容器
FROM buildpack-deps:jessie-scm
RUN echo "deb http://mirrors.163.com/debian/ jessie main non-free contrib\n\
deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib\n\
deb http://mirrors.163.com/debian/ jessie-backports main non-free contrib\n\
deb-src http://mirrors.163.com/debian/ jessie main non-free contrib\n\
deb-src http://mirrors.163.com/debian/ jessie-updates main non-free contrib\n\
deb-src http://mirrors.163.com/debian/ jessie-backports main non-free contrib\n\
deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib\n\
deb-src http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib\n\
deb http://ftp.cn.debian.org/debian jessie main" > /etc/apt/sources.list
# gcc for cgo
RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
gcc \
libc6-dev \
make \
pkg-config \
&& apt-get install -y curl git unzip vim iputils-ping wget \
&& rm -rf /var/lib/apt/lists/*
ENV GOLANG_VERSION 1.8.3
RUN set -eux; \
\
# this "case" statement is generated via "update.sh"
dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \
amd64) goRelArch='linux-amd64'; goRelSha256='1862f4c3d3907e59b04a757cfda0ea7aa9ef39274af99a784f5be843c80c6772' ;; \
armhf) goRelArch='linux-armv6l'; goRelSha256='3c30a3e24736ca776fc6314e5092fb8584bd3a4a2c2fa7307ae779ba2735e668' ;; \
i386) goRelArch='linux-386'; goRelSha256='ff4895eb68fb1daaec41c540602e8bb4c1e8bb2f0e7017367171913fc9995ed2' ;; \
ppc64el) goRelArch='linux-ppc64le'; goRelSha256='e5fb00adfc7291e657f1f3d31c09e74890b5328e6f991a3f395ca72a8c4dc0b3' ;; \
s390x) goRelArch='linux-s390x'; goRelSha256='e2ec3e7c293701b57ca1f32b37977ac9968f57b3df034f2cc2d531e80671e6c8' ;; \
*) goRelArch='src'; goRelSha256='5f5dea2447e7dcfdc50fa6b94c512e58bfba5673c039259fd843f68829d99fa6'; \
echo >&2; echo >&2 "warning: current architecture ($dpkgArch) does not have a corresponding Go binary release; will be building from source"; echo >&2 ;; \
esac; \
\
url="https://golang.org/dl/go${GOLANG_VERSION}.${goRelArch}.tar.gz"; \
wget -O go.tgz "$url"; \
echo "${goRelSha256} *go.tgz" | sha256sum -c -; \
tar -C /usr/local -xzf go.tgz; \
rm go.tgz; \
\
if [ "$goRelArch" = 'src' ]; then \
echo >&2; \
echo >&2 'error: UNIMPLEMENTED'; \
echo >&2 'TODO install golang-any from jessie-backports for GOROOT_BOOTSTRAP (and uninstall after build)'; \
echo >&2; \
exit 1; \
fi; \
\
export PATH="/usr/local/go/bin:$PATH"; \
go version
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
ENV TZ=Asia/Shanghai
RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
dpkg-reconfigure --frontend noninteractive tzdata
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
WORKDIR $GOPATH
COPY go-wrapper /usr/local/bin/
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Docker
1
https://gitee.com/open-repo/docker.git
git@gitee.com:open-repo/docker.git
open-repo
docker
docker
master

搜索帮助