~dricottone/container-images

88ddaa4f1f480923e14f662bab30cacff277ba40 — Dominic Ricottone 7 months ago c488c77 debbuilder
WIP: debbuilder

Currently does not work.
A debbuilder/.gitignore => debbuilder/.gitignore +1 -0
@@ 0,0 1,1 @@
abuild

A debbuilder/Dockerfile => debbuilder/Dockerfile +19 -0
@@ 0,0 1,19 @@
FROM docker.io/library/ubuntu:18.04

# apt configuration
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak
RUN sed /etc/apt/sources.list.bak -e 's/# deb-src/deb-src/g' >/etc/apt/sources.list
RUN apt-get update && apt-get install -y --no-install-recommends build-essential cdbs devscripts equivs fakeroot && apt-get clean && rm -rf /tmp/* /var/tmp/*

# build script
RUN mkdir -p /build
WORKDIR /build
COPY build.sh /build/build.sh
RUN chmod 755 /build/build.sh

VOLUME /build/src
VOLUME /build/pkg

ENTRYPOINT ["/build/build.sh"]
CMD ["non_existant_package_name"]


A debbuilder/Makefile => debbuilder/Makefile +13 -0
@@ 0,0 1,13 @@
CONMAN=sudo docker

REGISTRY=registry.intra.dominic-ricottone.com
IMAGE=debbuilder
TAG=latest

image:
	$(CONMAN) buildx build --push \
		--platform linux/arm64,linux/amd64 \
		--tag $(REGISTRY)/$(IMAGE):$(TAG) \
		.

.PHONY: image

A debbuilder/README.md => debbuilder/README.md +22 -0
@@ 0,0 1,22 @@
# debbuilder


## Build and Deploy

```
make image
```


### Tags

 + `latest`

----

## Use

Builds DEB packages.
Not meant for humans.
See https://git.dominic-ricottone.com/~dricottone/simple-builder .


A debbuilder/build.sh => debbuilder/build.sh +6 -0
@@ 0,0 1,6 @@
#!/bin/sh
cd src/$1 || exit 1
mk-build-deps -i -r control -t "apt-get -o Debug::pkgProblemResolver=yes -y --no-install-recommends" || exit 1
debuild -b -uc -us || exit 1
cp -a /build/src/*.deb /build/src/*.buildinfo /build/src/*.changes /build/pkg/