diff --git a/.dockerignore b/.dockerignore index b19aa41..b2b5b13 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ /target /debian /rhel +/ubuntu diff --git a/.gitignore b/.gitignore index 5b45791..0ba6ad4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ Cargo.lock /debian /rhel +/ubuntu diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu new file mode 100644 index 0000000..6bfe2f5 --- /dev/null +++ b/Dockerfile.ubuntu @@ -0,0 +1,14 @@ +# vim: ft=dockerfile + +FROM ubuntu:latest + +ENV TZ=Etc/PST8PDT + +RUN ln -s /usr/share/zoneinfo/PST8PDT /etc/localtime + +RUN apt-get update -qq && apt-get install curl libnss3-tools build-essential libssl-dev pkg-config ca-certificates -y + +COPY hack/rustup.sh /bin +RUN chmod 755 /bin/rustup.sh + +CMD ["bash", "-c", "source /bin/rustup.sh && cd /root/ca_injector && cargo test -- --nocapture"] diff --git a/Makefile b/Makefile index b253a6b..abe8dea 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,12 @@ DOCKER_IMAGE=ca-injector-test DOCKER_RUN_DEBIAN=docker run -e RUST_BACKTRACE=full -it --rm -v ${PWD}:/root/ca_injector -v ${PWD}/debian/.rustup:/root/.rustup -v ${PWD}/debian/.cargo:/root/.cargo ${DOCKER_IMAGE}:debian +DOCKER_RUN_UBUNTU=docker run -e RUST_BACKTRACE=full -it --rm -v ${PWD}:/root/ca_injector -v ${PWD}/ubuntu/.rustup:/root/.rustup -v ${PWD}/ubuntu/.cargo:/root/.cargo ${DOCKER_IMAGE}:ubuntu test: build - mkdir -p debian rhel - ${DOCKER_RUN_DEBIAN} + mkdir -p debian ubuntu + ${DOCKER_RUN_DEBIAN} + ${DOCKER_RUN_UBUNTU} build: docker build -f Dockerfile.debian -t ${DOCKER_IMAGE}:debian . + docker build -f Dockerfile.ubuntu -t ${DOCKER_IMAGE}:ubuntu .