docker: improve dev env

- abort docker scripts on error
- generate version in system tests
- build debian packages in docker
- add make clean target
- fix lint
This commit is contained in:
André Roth
2024-08-02 23:17:29 +02:00
parent b342af0d96
commit 98b1ed07d1
14 changed files with 60 additions and 61 deletions

View File

@@ -1,21 +1,21 @@
FROM debian:bookworm-slim
RUN apt-get update -y && apt-get install -y --no-install-recommends curl gnupg apg bzip2 xz-utils ca-certificates golang golang-go golang-doc golang-src make git python3 python3-requests-unixsocket python3-termcolor python3-swiftclient python3-boto python3-azure-storage g++ python3-etcd3 python3-plyvel graphviz && \
RUN apt-get update -y && apt-get install -y --no-install-recommends curl gnupg apg bzip2 xz-utils ca-certificates golang golang-go golang-doc golang-src make git python3 python3-requests-unixsocket python3-termcolor python3-swiftclient python3-boto python3-azure-storage g++ python3-etcd3 python3-plyvel graphviz devscripts sudo dh-golang binutils-i686-linux-gnu binutils-aarch64-linux-gnu binutils-arm-linux-gnueabihf bash-completion && \
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN useradd -m --shell /bin/sh --home-dir /var/lib/aptly aptly
RUN mkdir app
WORKDIR /app
RUN mkdir /work
WORKDIR /work
RUN chown aptly /work
RUN mkdir /home/runner
RUN chown aptly /home/runner
RUN cd /home/runner; git clone https://github.com/aptly-dev/aptly-fixture-db.git
RUN cd /home/runner; git clone https://github.com/aptly-dev/aptly-fixture-pool.git
RUN cd /home/runner; curl -O http://repo.aptly.info/system-tests/etcd.db
RUN cd /var/lib/aptly; git clone https://github.com/aptly-dev/aptly-fixture-db.git
RUN cd /var/lib/aptly; git clone https://github.com/aptly-dev/aptly-fixture-pool.git
RUN cd /var/lib/aptly; curl -O http://repo.aptly.info/system-tests/etcd.db
RUN echo "aptly ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/aptly
ADD . /src
RUN chown aptly -R /src
RUN cd /src; su aptly -c "HOME=/home/runner go mod tidy"
RUN cd /src; su aptly -c "go mod download"
RUN /src/system/t13_etcd/install-etcd.sh
RUN rm -rf /src