forked from lhopki01/docker-chain-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_dirs.sh
executable file
·38 lines (29 loc) · 1.21 KB
/
test_dirs.sh
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
34
35
36
37
38
#!/bin/bash
set -euo pipefail
rm -rf test_dirs
mkdir test_dirs
echo "registry: docker/registry" > test_dirs/conf.yaml
mkdir test_dirs/alpha
echo "FROM alpine:3.9" > test_dirs/alpha/Dockerfile
echo "RUN sleep 1" >> test_dirs/alpha/Dockerfile
echo "1.0.0" > test_dirs/alpha/VERSION
mkdir test_dirs/alpha-2
echo "FROM docker/registry/alpha:1.0.0" > test_dirs/alpha-2/Dockerfile
echo "RUN sleep 1" >> test_dirs/alpha-2/Dockerfile
echo "0.1.0" > test_dirs/alpha-2/VERSION
mkdir test_dirs/alpha-1
echo "FROM docker/registry/alpha:1.0.0" > test_dirs/alpha-1/Dockerfile
echo "RUN sleep 1" >> test_dirs/alpha-1/Dockerfile
echo "0.1.0" > test_dirs/alpha-1/VERSION
mkdir test_dirs/alpha-1-beta
echo "FROM docker/registry/alpha-1:0.1.0" > test_dirs/alpha-1-beta/Dockerfile
echo "RUN sleep 1" >> test_dirs/alpha-1-beta/Dockerfile
echo "0.0.1" > test_dirs/alpha-1-beta/VERSION
mkdir test_dirs/charlie
echo "FROM alpine:3.9" > test_dirs/charlie/Dockerfile
echo "RUN sleep 1" >> test_dirs/charlie/Dockerfile
echo "1.0.0" > test_dirs/charlie/VERSION
mkdir test_dirs/charlie-1
echo "FROM docker/registry/charlie:1.0.0" > test_dirs/charlie-1/Dockerfile
echo "RUN sleep 1" >> test_dirs/charlie-1/Dockerfile
echo "0.1.0" > test_dirs/charlie-1/VERSION