Skip to content

Commit b9748be

Browse files
committed
Combine separate runner scripts
1 parent 370a876 commit b9748be

3 files changed

Lines changed: 17 additions & 24 deletions

File tree

runner.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
CONTAINER=layer_builder
2+
IMAGE=layer_builder_img
3+
RUNTIME=$(command -v podman || command -v docker)
4+
5+
$RUNTIME build -t $IMAGE .
6+
$RUNTIME run -td --name=$CONTAINER $IMAGE
7+
$RUNTIME cp ./requirements.txt $CONTAINER:/
8+
9+
$RUNTIME exec -i $CONTAINER /bin/bash < ./docker_install.sh
10+
$RUNTIME cp $CONTAINER:/tmp/python_layer.zip python_layer.zip
11+
$RUNTIME stop $CONTAINER
12+
13+
$RUNTIME rm $CONTAINER
14+
$RUNTIME rmi $IMAGE:latest
15+
16+
echo "Layer is ready..."
17+
echo "Size: $(du -sh python_layer.zip)"

runner_docker.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

runner_podman.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)