forked from api7/apisix-build-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.apisix-base.rpm
33 lines (26 loc) · 1001 Bytes
/
Dockerfile.apisix-base.rpm
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
ARG IMAGE_BASE="centos"
ARG IMAGE_TAG="7"
FROM ${IMAGE_BASE}:${IMAGE_TAG}
# Note: The duplication around the rpm series dockerfile here
# is used for reuse the container layer cache
RUN if [[ $(rpm --eval '%{centos_ver}') == "8" ]]; then \
sed -re "s/^#?\s*(mirrorlist)/#\1/g" \
-e "s|^#?\s*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" \
-i /etc/yum.repos.d/CentOS-Linux-*; \
dnf install -y centos-release-stream; \
dnf swap -y centos-{linux,stream}-repos; \
dnf distro-sync -y; \
fi
COPY ./utils/build-common.sh /tmp/build-common.sh
COPY build-apisix-base.sh /tmp/build-apisix-base.sh
COPY ./utils/determine-dist.sh /tmp/determine-dist.sh
WORKDIR /tmp
ARG VERSION
ARG IMAGE_BASE
ARG IMAGE_TAG
ENV IMAGE_BASE=${IMAGE_BASE}
ENV IMAGE_TAG=${IMAGE_TAG}
ENV version=${VERSION}
RUN ./build-common.sh build_apisix_base_rpm \
# determine dist and write it into /tmp/dist file
&& /tmp/determine-dist.sh