Skip to content

Commit

Permalink
add 3.5 and 3.6 gliderlabs variants
Browse files Browse the repository at this point in the history
related to gliderlabs#288
  • Loading branch information
Andy Shinn committed May 31, 2017
1 parent 275cf6e commit 73dc25d
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 1 deletion.
43 changes: 43 additions & 0 deletions test/test_gliderlabs_alpine-3.5.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
setup() {
docker history gliderlabs/alpine:3.5 >/dev/null 2>&1
}

@test "version is correct" {
run docker run gliderlabs/alpine:3.5 cat /etc/os-release
[ $status -eq 0 ]
[ "${lines[2]}" = "VERSION_ID=3.5.2" ]
}

@test "package installs cleanly" {
run docker run gliderlabs/alpine:3.5 apk add --update openssl
[ $status -eq 0 ]
}

@test "timezone" {
run docker run gliderlabs/alpine:3.5 date +%Z
[ $status -eq 0 ]
[ "$output" = "UTC" ]
}

@test "apk-install script should be available" {
run docker run gliderlabs/alpine:3.5 which apk-install
[ $status -eq 0 ]
}

@test "repository list is correct" {
run docker run gliderlabs/alpine:3.5 cat /etc/apk/repositories
[ $status -eq 0 ]
[ "${lines[0]}" = "http://alpine.gliderlabs.com/alpine/v3.5/main" ]
[ "${lines[1]}" = "http://alpine.gliderlabs.com/alpine/v3.5/community" ]
}

@test "cache is empty" {
run docker run gliderlabs/alpine:3.5 sh -c "ls -1 /var/cache/apk | wc -l"
[ $status -eq 0 ]
[ "$output" = "0" ]
}

@test "root password is disabled" {
run docker run --user nobody gliderlabs/alpine:3.5 su
[ $status -eq 1 ]
}
43 changes: 43 additions & 0 deletions test/test_gliderlabs_alpine-3.6.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
setup() {
docker history gliderlabs/alpine:3.6 >/dev/null 2>&1
}

@test "version is correct" {
run docker run gliderlabs/alpine:3.6 cat /etc/os-release
[ $status -eq 0 ]
[ "${lines[2]}" = "VERSION_ID=3.6.0" ]
}

@test "package installs cleanly" {
run docker run gliderlabs/alpine:3.6 apk add --update openssl
[ $status -eq 0 ]
}

@test "timezone" {
run docker run gliderlabs/alpine:3.6 date +%Z
[ $status -eq 0 ]
[ "$output" = "UTC" ]
}

@test "apk-install script should be available" {
run docker run gliderlabs/alpine:3.6 which apk-install
[ $status -eq 0 ]
}

@test "repository list is correct" {
run docker run gliderlabs/alpine:3.6 cat /etc/apk/repositories
[ $status -eq 0 ]
[ "${lines[0]}" = "http://alpine.gliderlabs.com/alpine/v3.6/main" ]
[ "${lines[1]}" = "http://alpine.gliderlabs.com/alpine/v3.6/community" ]
}

@test "cache is empty" {
run docker run gliderlabs/alpine:3.6 sh -c "ls -1 /var/cache/apk | wc -l"
[ $status -eq 0 ]
[ "$output" = "0" ]
}

@test "root password is disabled" {
run docker run --user nobody gliderlabs/alpine:3.6 su
[ $status -eq 1 ]
}
2 changes: 1 addition & 1 deletion versions/gliderlabs-3.4/options
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ export RELEASE="v3.4"
export MIRROR="http://alpine.gliderlabs.com/alpine"
export PACKAGES="alpine-baselayout,alpine-keys,apk-tools,libc-utils"
export BUILD_OPTIONS=(-b -s -c -t UTC -r $RELEASE -m $MIRROR -p $PACKAGES)
export TAGS=(gliderlabs/alpine:3.4 gliderlabs/alpine:latest)
export TAGS=(gliderlabs/alpine:3.4)
export PUSH_IMAGE="true"
3 changes: 3 additions & 0 deletions versions/gliderlabs-3.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM scratch
ADD rootfs.tar.xz /
CMD ["/bin/sh"]
6 changes: 6 additions & 0 deletions versions/gliderlabs-3.5/options
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export RELEASE="v3.5"
export MIRROR="http://alpine.gliderlabs.com/alpine"
export PACKAGES="alpine-baselayout,alpine-keys,apk-tools,libc-utils"
export BUILD_OPTIONS=(-b -s -c -t UTC -r $RELEASE -m $MIRROR -p $PACKAGES)
export TAGS=(gliderlabs/alpine:3.5)
export PUSH_IMAGE="true"
3 changes: 3 additions & 0 deletions versions/gliderlabs-3.6/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM scratch
ADD rootfs.tar.xz /
CMD ["/bin/sh"]
6 changes: 6 additions & 0 deletions versions/gliderlabs-3.6/options
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export RELEASE="v3.6"
export MIRROR="http://alpine.gliderlabs.com/alpine"
export PACKAGES="alpine-baselayout,alpine-keys,apk-tools,libc-utils"
export BUILD_OPTIONS=(-b -s -c -t UTC -r $RELEASE -m $MIRROR -p $PACKAGES)
export TAGS=(gliderlabs/alpine:3.6 gliderlabs/alpine:latest)
export PUSH_IMAGE="true"

0 comments on commit 73dc25d

Please sign in to comment.