Add ubuntu target

Signed-off-by: Erik Hollensbe <git@hollensbe.org>
This commit is contained in:
Erik Hollensbe
2022-02-28 02:20:10 -08:00
parent f68318ca64
commit cd53a2b0fa
4 changed files with 21 additions and 2 deletions
+1
View File
@@ -1,3 +1,4 @@
/target
/debian
/rhel
/ubuntu
+1
View File
@@ -2,3 +2,4 @@
Cargo.lock
/debian
/rhel
/ubuntu
+14
View File
@@ -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"]
+5 -2
View File
@@ -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 .