-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile.amd64.centos
52 lines (43 loc) · 1.07 KB
/
Dockerfile.amd64.centos
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
49
50
51
52
FROM centos:7.2.1511
# install required dependencies
RUN yum update -y \
&& yum install -y \
wget \
git \
gcc \
ruby-devel \
fuse \
fuse-devel \
pam-devel \
automake \
autoconf \
libtool \
make \
rpm-build \
rpm-sign \
rubygems \
libseccomp \
libseccomp-devel \
vim \
tree \
&& yum clean all
# install fpm to build rpm package
RUN gem install --no-ri --no-rdoc fpm
# install golang
ENV go_version=1.10.4
ENV arch=amd64
RUN wget --quiet https://storage.googleapis.com/golang/go${go_version}.linux-${arch}.tar.gz \
&& tar -C /usr/local -xzf go${go_version}.linux-${arch}.tar.gz \
&& rm go${go_version}.linux-${arch}.tar.gz \
&& cp /usr/local/go/bin/* /usr/local/bin/
WORKDIR /build
# keys stores the gpg keys
VOLUME /build/keys
# deb package will be released at the folder.
VOLUME /build/bundles
# copy debian control data and related scripts
COPY rpmspec /build/
COPY scripts/* /build/scripts/
# CMD is like git-commit, rpm-version, rpm-release
CMD ["master", "1.0.0~unstable", "1.el7.centos"]
ENTRYPOINT ["bash", "-x", "/build/build.sh"]