Skip to content

Commit

Permalink
Merge pull request #21 from srbala/alpine-314
Browse files Browse the repository at this point in the history
Update to alpine and bats versions
  • Loading branch information
mgoltzsche authored Aug 23, 2021
2 parents 4442e1a + 21b7eec commit 58ab347
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# runc
FROM golang:1.16-alpine3.13 AS runc
FROM golang:1.16-alpine3.14 AS runc
ARG RUNC_VERSION=v1.0.1
RUN set -eux; \
apk add --no-cache --virtual .build-deps gcc musl-dev libseccomp-dev libseccomp-static make git bash; \
Expand All @@ -13,13 +13,13 @@ RUN set -eux; \


# podman build base
FROM golang:1.16-alpine3.13 AS podmanbuildbase
FROM golang:1.16-alpine3.14 AS podmanbuildbase
RUN apk add --update --no-cache git make gcc pkgconf musl-dev \
btrfs-progs btrfs-progs-dev libassuan-dev lvm2-dev device-mapper \
glib-static libc-dev gpgme-dev protobuf-dev protobuf-c-dev \
libseccomp-dev libseccomp-static libselinux-dev ostree-dev openssl iptables \
bash go-md2man
ARG BATS_VERSION=v1.3.0
ARG BATS_VERSION=v1.4.1
RUN git clone -c 'advice.detachedHead=false' --branch ${BATS_VERSION} https://github.com/bats-core/bats-core.git && cd bats-core && ./install.sh /usr/local


Expand Down Expand Up @@ -112,11 +112,11 @@ RUN set -ex; \


# Download gpg
FROM alpine:3.13 AS gpg
FROM alpine:3.14 AS gpg
RUN apk add --no-cache gnupg

# Build podman base image
FROM alpine:3.13 AS podmanbase
FROM alpine:3.14 AS podmanbase
LABEL maintainer="Max Goltzsche <[email protected]>"
RUN apk add --no-cache tzdata ca-certificates
COPY --from=conmon /conmon/bin/conmon /usr/local/lib/podman/conmon
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile-remote
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# podman build base
FROM golang:1.16-alpine3.13 AS podmanbuildbase
FROM golang:1.16-alpine3.14 AS podmanbuildbase
RUN apk add --update --no-cache git make gcc pkgconf musl-dev \
btrfs-progs btrfs-progs-dev libassuan-dev lvm2-dev device-mapper \
glib-static libc-dev gpgme-dev protobuf-dev protobuf-c-dev \
libseccomp-dev libseccomp-static libselinux-dev ostree-dev openssl iptables \
bash go-md2man
ARG BATS_VERSION=v1.3.0
ARG BATS_VERSION=v1.4.1
RUN git clone -c 'advice.detachedHead=false' --branch ${BATS_VERSION} https://github.com/bats-core/bats-core.git && cd bats-core && ./install.sh /usr/local

# podman remote
Expand All @@ -23,6 +23,6 @@ RUN set -eux; \
podman --help >/dev/null; \
[ "$(ldd /usr/local/bin/podman-remote | wc -l)" -eq 0 ] || (ldd /usr/local/bin/podman-remote; false)

FROM alpine:3.13
FROM alpine:3.14
COPY --from=podman-remote /usr/local/bin /usr/local/bin
RUN adduser -D podman-remote -h /podman -u 1000
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ run:
$(PODMAN_IMAGE) /bin/sh

clean:
$(DOCKER) run --rm -v "`pwd`:/work" alpine:3.13 rm -rf /work/build
$(DOCKER) run --rm -v "`pwd`:/work" alpine:3.14 rm -rf /work/build

run-server: podman-ssh
# TODO: make sshd log to stdout (while still ensuring that we know when it is available)
Expand Down
4 changes: 2 additions & 2 deletions test/remote.bats
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ teardown_file() {

@test "remote podman - run container" {
$DOCKER run --rm --network=host "${PODMAN_REMOTE_IMAGE}" \
podman --url=tcp://$PODMAN_ADDRESS run alpine:3.13 echo hello from remote container
podman --url=tcp://$PODMAN_ADDRESS run alpine:3.14 echo hello from remote container
}

@test "remote podman - build image from dockerfile" {
Expand All @@ -33,7 +33,7 @@ teardown_file() {
"${PODMAN_REMOTE_IMAGE}" \
sh -c "set -ex; \
mkdir /tmp/testcontext
printf 'FROM alpine:3.13\nRUN echo hello\nCMD [ "/bin/echo", "hello" ]' > /tmp/testcontext/Dockerfile
printf 'FROM alpine:3.14\nRUN echo hello\nCMD [ "/bin/echo", "hello" ]' > /tmp/testcontext/Dockerfile
podman --log-level=debug --remote --url=tcp://$PODMAN_ADDRESS build -t testbuild -f /tmp/testcontext/Dockerfile /tmp/testcontext; \
podman --url=tcp://$PODMAN_ADDRESS run testbuild echo hello from remote container"
}
2 changes: 1 addition & 1 deletion test/rootful.bats
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ skipIfDockerUnavailableAndNotRunAsRoot() {
$DOCKER run --rm --privileged --entrypoint /bin/sh -u root:root \
-v "$PODMAN_ROOT_DATA_DIR:/var/lib/containers/storage" \
"${PODMAN_IMAGE}" \
-c 'podman run --rm alpine:3.13 wget -O /dev/null http://example.org'
-c 'podman run --rm alpine:3.14 wget -O /dev/null http://example.org'
}

@test "rootful podman - build image from dockerfile" {
Expand Down
8 changes: 4 additions & 4 deletions test/rootless.bats
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ load test_helper.bash
$DOCKER run --rm --privileged -u podman:podman \
-v "$PODMAN_ROOT_DATA_DIR:/podman/.local/share/containers/storage" \
"${PODMAN_IMAGE}" \
docker run --rm alpine:3.13 wget -O /dev/null http://example.org
docker run --rm alpine:3.14 wget -O /dev/null http://example.org
}

@test "$TEST_PREFIX podman - uid mapping (using fuse-overlayfs) {
$DOCKER run --rm --privileged -u podman:podman \
-v "$PODMAN_ROOT_DATA_DIR:/podman/.local/share/containers/storage" \
"${PODMAN_IMAGE}" \
docker run --rm alpine:3.13 /bin/sh -c 'set -ex; touch /file; chown guest /file; [ $(stat -c %U /file) = guest ]'
docker run --rm alpine:3.14 /bin/sh -c 'set -ex; touch /file; chown guest /file; [ $(stat -c %U /file) = guest ]'
}
@test "$TEST_PREFIX podman - unmapped uid" {
Expand All @@ -30,7 +30,7 @@ load test_helper.bash
# this doesn't work with podman (v3.0.1) due to missing uid mapping
$DOCKER run --rm --privileged --user 9000:9000 \
"${PODMAN_IMAGE}" \
docker run --rm alpine:3.13 wget -O /dev/null http://example.org
docker run --rm alpine:3.14 wget -O /dev/null http://example.org
}
@test "$TEST_PREFIX podman - build image from dockerfile" {
Expand All @@ -39,7 +39,7 @@ load test_helper.bash
"${PODMAN_IMAGE}" \
-c 'set -e;
podman build -t podmantestimage -f - . <<-EOF
FROM alpine:3.13
FROM alpine:3.14
RUN echo hello world > /hello
CMD ["/bin/cat", "/hello"]
EOF'
Expand Down

0 comments on commit 58ab347

Please sign in to comment.