forked from istio/istio
-
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.
Prebuild base images for testing images in docker (istio#27402)
* Prebuild base docker images * Use dockerx * Temporarily use my repo * Revert "Temporarily use my repo" This reverts commit 708bce9. * Add distroless * fix dockerx
- Loading branch information
1 parent
c2632e4
commit 75a656d
Showing
7 changed files
with
118 additions
and
52 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
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,31 @@ | ||
ARG VM_IMAGE_NAME=ubuntu | ||
ARG VM_IMAGE_VERSION=bionic | ||
FROM ${VM_IMAGE_NAME}:${VM_IMAGE_VERSION} | ||
# Dockerfile for different VM OS versions | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Do not add more stuff to this list that isn't small or critically useful. | ||
# If you occasionally need something on the container do | ||
# sudo apt-get update && apt-get whichever | ||
|
||
# hadolint ignore=DL3005,DL3008 | ||
RUN apt-get update && \ | ||
apt-get install --no-install-recommends -y \ | ||
iptables \ | ||
iproute2 \ | ||
sudo \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/log/*log /var/lib/apt/lists/* /var/log/apt/* /var/lib/dpkg/*-old /var/cache/debconf/*-old | ||
|
||
# Fix the bug of --to-ports not available. | ||
# Redeclare ARGs to acquire values declared outside of build stage | ||
ARG VM_IMAGE_NAME | ||
ARG VM_IMAGE_VERSION | ||
RUN if [ "$VM_IMAGE_NAME" = "debian" ] && [ "$VM_IMAGE_VERSION" = "10" ]; then \ | ||
update-alternatives --set iptables /usr/sbin/iptables-legacy && \ | ||
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy; fi | ||
|
||
# Add a user that will run the application. This allows running as this user and capture iptables | ||
RUN useradd -m --uid 1338 application && \ | ||
echo "application ALL=NOPASSWD: ALL" >> /etc/sudoers |
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,15 @@ | ||
FROM centos:8 | ||
|
||
# hadolint ignore=DL3005,DL3008 | ||
RUN yum upgrade -y && \ | ||
yum install -y \ | ||
iptables \ | ||
iproute \ | ||
sudo \ | ||
&& update-ca-trust \ | ||
yum clean all && \ | ||
rm -rf /var/cache/yum | ||
|
||
# Add a user that will run the application. This allows running as this user and capture iptables | ||
RUN useradd -m --uid 1338 application && \ | ||
echo "application ALL=NOPASSWD: ALL" >> /etc/sudoers |
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,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright Istio Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# This script runs go tests in a package, but each test is run individually. This helps | ||
# isolate tests that are improperly depending on global state modification of other tests | ||
|
||
set -ex | ||
|
||
HUB="${HUB:-istio.io/docker}" | ||
TAG="${TAG:?specify a tag}" | ||
|
||
DOCKER_TARGETS="docker.base docker.distroless docker.app_sidecar_base_debian_9 docker.app_sidecar_base_debian_10 docker.app_sidecar_base_ubuntu_xenial docker.app_sidecar_base_ubuntu_bionic docker.app_sidecar_base_ubuntu_focal docker.app_sidecar_base_centos_8" make dockerx.pushx |
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