Build docker busybox image locally
Change-Id: I521962daca113202b52221cb53d93c0cad8f2d6f Closes-bug: #1633435
This commit is contained in:
parent
9cab12a819
commit
b7f8f23440
contrib/busybox
devstack
kuryr_libnetwork/tests/fullstack
rally-jobs/plugins
3
contrib/busybox/Dockerfile
Normal file
3
contrib/busybox/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
FROM scratch
|
||||||
|
ADD busybox.tar.xz /
|
||||||
|
CMD ["sh"]
|
5
contrib/busybox/build_image.sh
Executable file
5
contrib/busybox/build_image.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
tar cv --files-from /dev/null | docker import - scratch
|
||||||
|
|
||||||
|
sudo docker build -t kuryr/busybox .
|
BIN
contrib/busybox/busybox.tar.xz
Normal file
BIN
contrib/busybox/busybox.tar.xz
Normal file
Binary file not shown.
@ -155,6 +155,11 @@ if is_service_enabled kuryr-libnetwork; then
|
|||||||
done
|
done
|
||||||
echo ""
|
echo ""
|
||||||
sudo chown "$STACK_USER":docker "$KURYR_DOCKER_ENGINE_SOCKET_FILE"
|
sudo chown "$STACK_USER":docker "$KURYR_DOCKER_ENGINE_SOCKET_FILE"
|
||||||
|
|
||||||
|
echo "Build busybox docker image for fullstack and rally test"
|
||||||
|
cd $DEST/kuryr-libnetwork/contrib/busybox
|
||||||
|
sudo usermod -aG docker $STACK_USER
|
||||||
|
sh build_image.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
if [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
||||||
|
@ -22,7 +22,6 @@ class ContainerTest(kuryr_base.KuryrBaseTest):
|
|||||||
"""
|
"""
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(ContainerTest, self).setUp()
|
super(ContainerTest, self).setUp()
|
||||||
self.docker_client.pull(repository='busybox', tag='1')
|
|
||||||
|
|
||||||
fake_ipam = {
|
fake_ipam = {
|
||||||
"Driver": "kuryr",
|
"Driver": "kuryr",
|
||||||
@ -62,7 +61,7 @@ class ContainerTest(kuryr_base.KuryrBaseTest):
|
|||||||
# Test if support connect/disconnect operations
|
# Test if support connect/disconnect operations
|
||||||
container_name = lib_utils.get_random_string(8)
|
container_name = lib_utils.get_random_string(8)
|
||||||
container = self.docker_client.create_container(
|
container = self.docker_client.create_container(
|
||||||
image='busybox:1',
|
image='kuryr/busybox',
|
||||||
command='/bin/sleep 600',
|
command='/bin/sleep 600',
|
||||||
hostname='kuryr_test_container',
|
hostname='kuryr_test_container',
|
||||||
name=container_name)
|
name=container_name)
|
||||||
|
@ -53,8 +53,6 @@ class DockerNetworkContext(context.Context):
|
|||||||
"""Create kuryr or non-kuryr docker network, and prepare image cache"""
|
"""Create kuryr or non-kuryr docker network, and prepare image cache"""
|
||||||
try:
|
try:
|
||||||
docker_client = docker.Client(base_url="tcp://0.0.0.0:2375")
|
docker_client = docker.Client(base_url="tcp://0.0.0.0:2375")
|
||||||
# Cache busybox image
|
|
||||||
docker_client.pull(repository="busybox", tag="1")
|
|
||||||
|
|
||||||
if self.config["is_kuryr"]:
|
if self.config["is_kuryr"]:
|
||||||
ipam = {
|
ipam = {
|
||||||
|
@ -80,7 +80,7 @@ class KuryrScenario(scenario.OpenStackScenario):
|
|||||||
def _start_container(self, container_create_args=None):
|
def _start_container(self, container_create_args=None):
|
||||||
"""Start Container on docker network."""
|
"""Start Container on docker network."""
|
||||||
container = self.docker_client.create_container(
|
container = self.docker_client.create_container(
|
||||||
image='busybox:1',
|
image='kuryr/busybox',
|
||||||
command='/bin/sleep 600')
|
command='/bin/sleep 600')
|
||||||
container_id = container.get('Id')
|
container_id = container.get('Id')
|
||||||
self.docker_client.start(container=container_id)
|
self.docker_client.start(container=container_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user