-
Notifications
You must be signed in to change notification settings - Fork 27
/
centos_7.Dockerfile
48 lines (37 loc) · 1.91 KB
/
centos_7.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM centos:7
MAINTAINER Andy Neff <andyneff@users.noreply.github.com>
#Docker RUN example, pass in the git-lfs checkout copy you are working with
LABEL RUN="docker run -v git-lfs-repo-dir:/src -v repo_dir:/repo"
ENV GIT_SHA256=26831c5e48a8c2bf6a4fede1b38e1e51ffd6dad85952cf69ac520ebd81a5ae82
RUN sed -i 's/mirror\.centos\.org/vault.centos.org/g' /etc/yum.repos.d/*.repo
RUN sed -i 's/^# *baseurl=/baseurl=/' /etc/yum.repos.d/*.repo
RUN sed -i 's/^mirrorlist=/#mirrorlist=/' /etc/yum.repos.d/*.repo
RUN yum -y upgrade
RUN yum install -y centos-release-scl
RUN sed -i 's/mirror\.centos\.org/vault.centos.org/g' /etc/yum.repos.d/CentOS-SCLo-scl*.repo
RUN sed -i 's/^# *baseurl=/baseurl=/' /etc/yum.repos.d/CentOS-SCLo-scl*.repo
RUN sed -i 's/^mirrorlist=/#mirrorlist=/' /etc/yum.repos.d/CentOS-SCLo-scl*.repo
RUN yum install -y rsync rh-ruby30-ruby rh-ruby30-build gcc
RUN yum install -y gettext-devel libcurl-devel openssl-devel perl-CPAN perl-devel zlib-devel make wget autoconf && \
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.34.5.tar.gz -O git.tar.gz && \
[ "$(sha256sum git.tar.gz | cut -d' ' -f1)" = "${GIT_SHA256}" ] && \
tar -zxf git.tar.gz && \
cd git-* && \
make configure && \
./configure --prefix=/usr/local && \
make install && \
git --version
ARG GOLANG_VERSION=1.23.1
ARG GOLANG_SHA256=49bbb517cfa9eee677e1e7897f7cf9cfdbcf49e05f61984a2789136de359f9bd
ARG GOLANG_ARCH=amd64
ENV GOROOT=/usr/local/go
ENV GOTOOLCHAIN=local
RUN cd /usr/local && \
curl -L -O https://golang.org/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz && \
[ "$(sha256sum go${GOLANG_VERSION}.linux-amd64.tar.gz | cut -d' ' -f1)" = "${GOLANG_SHA256}" ] && \
tar zxf go${GOLANG_VERSION}.linux-amd64.tar.gz && \
ln -s /usr/local/go/bin/go /usr/bin/go && \
ln -s /usr/local/go/bin/gofmt /usr/bin/gofmt
#Add the simple build repo script
COPY centos_script.bsh /tmp/
CMD scl enable rh-ruby30 /tmp/centos_script.bsh