forked from vmware/photon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker image name includes release, use stage RPMS for tdnf install
Change-Id: I41da67346ed72a4f77cefcc2e1b0d8de14a41aaf Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/4082 Reviewed-by: Anish Swaminathan <[email protected]> Tested-by: Anish Swaminathan <[email protected]>
- Loading branch information
Showing
22 changed files
with
99 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
FROM vmware/photon:2.0 | ||
FROM k8s-base-image:2.0 | ||
|
||
MAINTAINER [email protected] | ||
|
||
RUN tdnf install -y sed net-tools | ||
COPY [ "./tmp/calico/opt/cni/bin/calico", \ | ||
"./tmp/calico/opt/cni/bin/calico-ipam", \ | ||
"./tmp/calico/opt/cni/bin/portmap", \ | ||
|
2 changes: 1 addition & 1 deletion
2
support/dockerfiles/k8s-docker-images/Dockerfile.calico-k8s-policy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM vmware/photon:2.0 | ||
FROM k8s-base-image:2.0 | ||
|
||
MAINTAINER [email protected] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
FROM vmware/photon:2.0 | ||
FROM k8s-base-image:2.0 | ||
|
||
MAINTAINER [email protected] | ||
|
||
# Minimum Docker API version required for libnetwork. | ||
ENV DOCKER_API_VERSION 1.21 | ||
|
||
# Install required packages | ||
RUN tdnf install -y initscripts iproute2 ipset iptables iputils net-tools runit | ||
COPY [ "./stage-rpms-tdnf.conf", "./tmp/stage-rpms.repo", "/tmp/tdnf/" ] | ||
RUN tdnf -c /tmp/tdnf/stage-rpms-tdnf.conf install -y initscripts iproute2 \ | ||
ipset iptables iputils runit --refresh | ||
|
||
# Copy binaries needed by calico/node | ||
COPY [ "./tmp/calico/usr/share/calico/docker/fs/etc", "/etc/" ] | ||
|
8 changes: 4 additions & 4 deletions
8
support/dockerfiles/k8s-docker-images/Dockerfile.dnsmasq-nanny
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# Photon Base Build Container | ||
|
||
FROM vmware/photon:2.0 | ||
FROM k8s-base-image:2.0 | ||
|
||
MAINTAINER [email protected] | ||
|
||
RUN tdnf install -y dnsmasq | ||
COPY [ "./stage-rpms-tdnf.conf", "./tmp/stage-rpms.repo", "/tmp/tdnf/" ] | ||
RUN tdnf -c /tmp/tdnf/stage-rpms-tdnf.conf install -y dnsmasq --refresh | ||
|
||
RUN echo "user=root" > /etc/dnsmasq.conf | ||
RUN mkdir -p /var/run/ | ||
STOPSIGNAL SIGCONT | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
FROM vmware/photon:2.0 | ||
FROM k8s-base-image:2.0 | ||
|
||
MAINTAINER [email protected] | ||
|
||
ENV FLANNEL_ARCH=amd64 | ||
|
||
RUN tdnf install -y iproute2 net-tools iptables | ||
COPY [ "./stage-rpms-tdnf.conf", "./tmp/stage-rpms.repo", "/tmp/tdnf/" ] | ||
RUN tdnf -c /tmp/tdnf/stage-rpms-tdnf.conf install -y iproute2 iptables --refresh | ||
|
||
ADD tmp/flannel/usr/bin/flanneld /opt/bin/flanneld | ||
COPY tmp/flannel/usr/share/flannel/docker/mk-docker-opts.sh /opt/bin/ | ||
RUN ln -s /usr/sbin/iptables /usr/local/bin/iptables | ||
|
2 changes: 1 addition & 1 deletion
2
support/dockerfiles/k8s-docker-images/Dockerfile.kube-controller-manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Photon Base Build Container | ||
|
||
FROM vmware/photon | ||
FROM vmware/photon:2.0 | ||
|
||
MAINTAINER [email protected] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
# Photon Base Build Container | ||
|
||
FROM vmware/photon:2.0 | ||
FROM k8s-base-image:2.0 | ||
|
||
MAINTAINER [email protected] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ FROM vmware/photon:2.0 | |
|
||
MAINTAINER [email protected] | ||
|
||
RUN tdnf install -y ebtables iptables iproute2 shadow socat | ||
RUN tdnf install -y ebtables iptables iproute2 shadow socat --refresh | ||
ADD tmp/k8s/usr/bin/kube-proxy /usr/bin/kube-proxy | ||
RUN ln -s /usr/bin/kube-proxy /usr/local/bin/kube-proxy | ||
|
||
|
5 changes: 3 additions & 2 deletions
5
support/dockerfiles/k8s-docker-images/Dockerfile.nginx-ingress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
FROM vmware/photon:2.0 | ||
FROM k8s-base-image:2.0 | ||
|
||
MAINTAINER [email protected] | ||
|
||
RUN tdnf install -y shadow openssl nginx | ||
COPY [ "./stage-rpms-tdnf.conf", "./tmp/stage-rpms.repo", "/tmp/tdnf/" ] | ||
RUN tdnf -c /tmp/tdnf/stage-rpms-tdnf.conf install -y openssl nginx shadow --refresh | ||
RUN useradd --system --no-create-home -U -s /bin/false nginx | ||
|
||
# forward nginx access and error logs to stdout and stderr | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
# Photon Base Build Container | ||
|
||
FROM vmware/photon:2.0 | ||
FROM k8s-base-image:2.0 | ||
|
||
MAINTAINER [email protected] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
setup_repo() | ||
{ | ||
mkdir -p tmp | ||
ln -fs ${STAGE_DIR}/RPMS tmp/RPMS | ||
ETH0_IP=`ip -4 addr show eth0 scope global | grep 'inet ' | awk '{print $2}' | cut -f1 -d'/'` | ||
cat stage-rpms.repo | sed 's/ETH0_IP/'"${ETH0_IP}"'/g' > tmp/stage-rpms.repo | ||
if ! iptables -C INPUT -p tcp --dport 62965 -j ACCEPT &> /dev/null; then | ||
iptables -A INPUT -p tcp --dport 62965 -j ACCEPT | ||
fi | ||
python3 -m http.server --bind ${ETH0_IP} 62965 & | ||
PY_WS_PID=$! | ||
if [ -z "${PY_WS_PID}" ]; then | ||
echo "Failed to start repo server" | ||
exit 1 | ||
fi | ||
echo "tdnf repo server started with pid: " ${PY_WS_PID} | ||
} | ||
|
||
function cleanup_repo { | ||
echo "Terminating tdnf repo server with pid: " ${PY_WS_PID} | ||
kill ${PY_WS_PID} | ||
} | ||
trap cleanup_repo EXIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[main] | ||
gpgcheck=1 | ||
installonly_limit=3 | ||
clean_requirements_on_remove=true | ||
repodir=/tmp/tdnf | ||
cachedir=/var/cache/tdnf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[stage-rpms] | ||
name=stage-rpms | ||
baseurl=http://ETH0_IP:62965/tmp/RPMS | ||
gpgkey=file:///etc/pki/rpm-gpg/VMWARE-RPM-GPG-KEY | ||
gpgcheck=0 | ||
enabled=1 | ||
skip_if_unavailable=True |