From 1bcc8c2fea3cbecfcc5953c7a936b9baaef2bab3 Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Tue, 27 Aug 2024 21:43:50 +0200 Subject: [PATCH] Add Dockerfile with hamnet70 build dependencies --- ci/docker/doc/Dockerfile | 2 +- ci/docker/impl/Dockerfile | 11 +++++++++++ ci/docker/impl/build.sh | 8 ++++++++ ci/docker/impl/test.sh | 8 ++++++++ ci/docker/impl/upload.sh | 10 ++++++++++ 5 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 ci/docker/impl/Dockerfile create mode 100755 ci/docker/impl/build.sh create mode 100755 ci/docker/impl/test.sh create mode 100755 ci/docker/impl/upload.sh diff --git a/ci/docker/doc/Dockerfile b/ci/docker/doc/Dockerfile index 60a0d7c..43932ea 100644 --- a/ci/docker/doc/Dockerfile +++ b/ci/docker/doc/Dockerfile @@ -1,7 +1,7 @@ FROM debian:stable # for basic Forgejo + AsciiDoctor support -RUN apt update && apt install -y --no-install-recommends nodejs git ruby-rubygems make && apt clean +RUN apt update && apt install -y --no-install-recommends nodejs git ruby-rubygems make ca-certificates && apt clean RUN gem install asciidoctor asciidoctor-diagram diff --git a/ci/docker/impl/Dockerfile b/ci/docker/impl/Dockerfile new file mode 100644 index 0000000..74016da --- /dev/null +++ b/ci/docker/impl/Dockerfile @@ -0,0 +1,11 @@ +FROM debian:stable + +# for Forgejo Actions +RUN apt update && apt install -y --no-install-recommends nodejs git ca-certificates && apt clean + +# Hamnet70 build dependencies +RUN apt install -y --no-install-recommends cmake make gcc libc-dev libliquid-dev libhackrf-dev libfec-dev libfftw3-dev && apt clean + +# run as unprivileged user in the container +RUN useradd -m ciuser +USER ciuser diff --git a/ci/docker/impl/build.sh b/ci/docker/impl/build.sh new file mode 100755 index 0000000..1500172 --- /dev/null +++ b/ci/docker/impl/build.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ -z "$1" ]; then + echo "usage: $0 " + exit 1 +fi + +docker build -t git.tkolb.de/amateurfunk/hamnet70/impl_buildenv:$1 . diff --git a/ci/docker/impl/test.sh b/ci/docker/impl/test.sh new file mode 100755 index 0000000..986308e --- /dev/null +++ b/ci/docker/impl/test.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ -z "$1" ]; then + echo "usage: $0 " + exit 1 +fi + +docker run -v $(realpath ../../../impl):/impl -it git.tkolb.de/amateurfunk/hamnet70/impl_buildenv:$1 diff --git a/ci/docker/impl/upload.sh b/ci/docker/impl/upload.sh new file mode 100755 index 0000000..63a7857 --- /dev/null +++ b/ci/docker/impl/upload.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ -z "$1" ]; then + echo "usage: $0 " + exit 1 +fi + +docker login +docker push git.tkolb.de/amateurfunk/hamnet70/impl_buildenv:$1 +docker logout