soju: contrib: add docker buildfile v2 PROPOSED

Moritz Poldrack: 1
 contrib: add docker buildfile

 2 files changed, 24 insertions(+), 0 deletions(-)
#1142013 .build.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~emersion/soju-dev/patches/49127/mbox | git am -3
Learn more about email & git

[PATCH soju v2] contrib: add docker buildfile Export this patch

From: Moritz Poldrack <git@moritz.sh>

Signed-off-by: Moritz Poldrack <git@moritz.sh>

As suggested by f_ on IRC

v1 → v2:
	now built as a scratch container

I left the commented out image in, if someone prefers pulling. It's
publically available and updated on a regular basis.

 contrib/docker/Dockerfile         | 13 +++++++++++++
 contrib/docker/docker-compose.yml | 11 +++++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 contrib/docker/Dockerfile
 create mode 100644 contrib/docker/docker-compose.yml

diff --git a/contrib/docker/Dockerfile b/contrib/docker/Dockerfile
new file mode 100644
index 0000000..f0b9aa8
--- /dev/null
+++ b/contrib/docker/Dockerfile
@@ -0,0 +1,13 @@
FROM alpine:edge AS build

RUN apk add --no-cache git && git clone https://git.sr.ht/~emersion/soju /src && apk del git
RUN apk add --no-cache go sqlite sqlite-libs sqlite-dev
RUN apk add --no-cache git make && cd /src; GOFLAGS='-trimpath -tags=moderncsqlite,netgo' CGO_ENABLE=0 make soju sojuctl && apk del make

FROM scratch

COPY --from=build /src/soju /src/sojuctl /src/sojudb /


ENTRYPOINT ["/soju", "-config", "/data/config"]
diff --git a/contrib/docker/docker-compose.yml b/contrib/docker/docker-compose.yml
new file mode 100644
index 0000000..5c4d9e7
--- /dev/null
+++ b/contrib/docker/docker-compose.yml
@@ -0,0 +1,11 @@
version: "3.9"
    build: .
    #image: mpldr/soju:latest
      - -debug
      - "6697:6697"
      - ./soju-data:/data
soju/patches/.build.yml: SUCCESS in 1m7s

[contrib: add docker buildfile][0] v2 from [Moritz Poldrack][1]

[0]: https://lists.sr.ht/~emersion/soju-dev/patches/49127
[1]: mailto:moritz@poldrack.dev

✓ #1142013 SUCCESS soju/patches/.build.yml https://builds.sr.ht/~emersion/job/1142013