Commit ce032e48 authored by Olav Morken's avatar Olav Morken
Browse files

GitLab CI: Avoid Docker-in-Docker

GitLab CI already runs all jobs in Docker. Running new Docker commands
requires us to use Docker-in-Docker.

In this case, this is unnecessary and unnecessarily complicated. We
can simply let GitLab CI run the required containers for us.

Instead of starting a new Docker container to build the package
parent f8f1fde2
/output/
......@@ -3,34 +3,28 @@ stages:
- deploy
build-debian-bullseye:
cache: {}
stage: build
image: registry.uninett.no/public/docker-builder
image: debian:bullseye
artifacts:
expire_in: 1h
paths:
- output
script:
- docker build -f Dockerfile-bullseye -t radsecproxy-debbuild-bullseye .
- rm -rf output/bullseye
- ./build.sh
- mkdir output/bullseye
- docker run -i radsecproxy-debbuild-bullseye | tar x -C output/bullseye/
- ls -l output/bullseye/
- cp -v *.deb output/bullseye/
build-debian-buster:
cache: {}
stage: build
image: registry.uninett.no/public/docker-builder
image: debian:buster
artifacts:
expire_in: 1h
paths:
- output
script:
- docker build -f Dockerfile-buster -t radsecproxy-debbuild-buster .
- rm -rf output/buster
- ./build.sh
- mkdir output/buster
- docker run -i radsecproxy-debbuild-buster | tar x -C output/buster/
- ls -l output/buster/
- cp -v *.deb output/buster/
deploy-apt:
stage: deploy
......
FROM debian:bullseye
WORKDIR /root/
COPY build.sh build.sh
RUN ./build.sh
CMD tar c *.deb
FROM debian:buster
WORKDIR /root/
COPY build.sh build.sh
RUN ./build.sh
CMD tar c *.deb
# Docker for building debian package of Radsecproxy at UNINETT
# Build Debian packages of Radsecproxy at UNINETT
This docker will generate a .deb package for Radsecproxy.
This repository will create and upload Debian packages for Radsecproxy to [apt.uninett.no](https://apt.uninett.no/).
## Usage
Edit **build.sh** and set the desired version number for Radsecproxy.
To build the packages locally, run:
```
docker build -f Dockerfile-[stretch|buster] -t radsecproxy-debbuild .
docker run -i radsecproxy-debbuild | tar x
docker run --rm -ti -v "$(pwd -P):/work" debian:bullseye /bin/sh -c 'cd /work && ./build.sh && mkdir -p output && cp *.deb output/'
```
......@@ -2,12 +2,6 @@
# set -x
set -e
chmod 700 .
whoami
pwd
cd /root
ls -ld .
# Install required build dependencies
apt-get update
apt-get -y upgrade
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment