~emersion/soju-dev

soju: contrib: add docker buildfile v1 SUPERSEDED

Moritz Poldrack: 1
 contrib: add docker buildfile

 2 files changed, 22 insertions(+), 0 deletions(-)
#1139512 .build.yml success
29 Jan 2024 08:15:13 alice <alice@ayaya.dev>:
You're right, I could probably also just throw it inside a scratch 
container. That should at least geht rid of the pull issues because of 
CVEs
Not quite, I also use this for deployment on my server. In that case I 
don't build the container anew, but instead just pull the image. Could 
probably remove it though.

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/48981/mbox | git am -3
Learn more about email & git

[PATCH soju] 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

 contrib/docker/Dockerfile         | 11 +++++++++++
 contrib/docker/docker-compose.yml | 11 +++++++++++
 2 files changed, 22 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..6c88495
--- /dev/null
+++ b/contrib/docker/Dockerfile
@@ -0,0 +1,11 @@
FROM alpine:edge

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=libsqlite3' make soju sojuctl && apk del make
RUN chmod a+w /src/cmd/soju /src/cmd/sojuctl
RUN mv /src/soju /src/sojuctl /src/sojudb /bin

EXPOSE 6697

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"
services:
  soju:
    build: .
    #image: mpldr/soju:latest
    command:
      - -debug
    ports:
      - "6697:6697"
    volumes:
      - ./soju-data:/data
-- 
2.43.0
soju/patches/.build.yml: SUCCESS in 1m8s

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

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

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