Browse Source

update dockerfile and minor changes

tags/v2.8.0-rc1
Daniel Thamdrup 2 years ago
parent
commit
0898a6aa91
5 changed files with 21 additions and 33 deletions
  1. 1
    0
      .gitignore
  2. 15
    25
      Dockerfile
  3. 2
    2
      README.md
  4. 3
    3
      distrib/docker/docker-compose.yml
  5. 0
    3
      distrib/docker/run.sh

+ 1
- 0
.gitignore View File

@@ -110,3 +110,4 @@ ergo.prof
110 110
 ergo.mprof
111 111
 /dist
112 112
 *.pem
113
+.dccache

+ 15
- 25
Dockerfile View File

@@ -1,46 +1,36 @@
1
-## build Ergo
1
+## build ergo binary
2 2
 FROM golang:1.16-alpine AS build-env
3 3
 
4
-RUN apk add --no-cache git make curl sed
4
+RUN apk add -U --force-refresh --no-cache --purge --clean-protected -l -u make
5 5
 
6
-# copy ergo
7
-RUN mkdir -p /go/src/github.com/ergochat/ergo
6
+# copy ergo source
8 7
 WORKDIR /go/src/github.com/ergochat/ergo
9
-ADD . /go/src/github.com/ergochat/ergo/
8
+COPY . .
10 9
 
11 10
 # modify default config file so that it doesn't die on IPv6
12 11
 # and so it can be exposed via 6667 by default
13
-run sed -i 's/^\(\s*\)\"127.0.0.1:6667\":.*$/\1":6667":/' /go/src/github.com/ergochat/ergo/default.yaml
14
-run sed -i 's/^\s*\"\[::1\]:6667\":.*$//' /go/src/github.com/ergochat/ergo/default.yaml
12
+RUN sed -i 's/^\(\s*\)\"127.0.0.1:6667\":.*$/\1":6667":/' /go/src/github.com/ergochat/ergo/default.yaml && \
13
+    sed -i 's/^\s*\"\[::1\]:6667\":.*$//' /go/src/github.com/ergochat/ergo/default.yaml
15 14
 
16 15
 # compile
17 16
 RUN make
18 17
 
19
-
20
-
21
-## run Ergo
22
-FROM alpine:3.9
18
+## build ergo container
19
+FROM alpine:3.13
23 20
 
24 21
 # metadata
25
-LABEL maintainer="daniel@danieloaks.net"
26
-LABEL description="Ergo is a modern, experimental IRC server written in Go"
27
-
28
-# install latest updates and configure alpine
29
-RUN apk update
30
-RUN apk upgrade
31
-RUN mkdir /lib/modules
22
+LABEL maintainer="Daniel Oaks <daniel@danieloaks.net>,Daniel Thamdrup <dallemon@protonmail.com>" \
23
+      description="Ergo is a modern, experimental IRC server written in Go"
32 24
 
33 25
 # standard ports listened on
34 26
 EXPOSE 6667/tcp 6697/tcp
35 27
 
36
-# oragono itself
37
-RUN mkdir -p /ircd-bin
38
-COPY --from=build-env /go/bin/ergo /ircd-bin
28
+# ergo itself
29
+COPY --from=build-env /go/bin/ergo \
30
+                      /go/src/github.com/ergochat/ergo/default.yaml \
31
+                      /go/src/github.com/ergochat/ergo/distrib/docker/run.sh \
32
+                      /ircd-bin/
39 33
 COPY --from=build-env /go/src/github.com/ergochat/ergo/languages /ircd-bin/languages/
40
-COPY --from=build-env /go/src/github.com/ergochat/ergo/default.yaml /ircd-bin/default.yaml
41
-
42
-COPY distrib/docker/run.sh /ircd-bin/run.sh
43
-RUN chmod +x /ircd-bin/run.sh
44 34
 
45 35
 # running volume holding config file, db, certs
46 36
 VOLUME /ircd

+ 2
- 2
README.md View File

@@ -58,14 +58,14 @@ ergo run     # server should be ready to go!
58 58
 
59 59
 ### Platform Packages
60 60
 
61
-Some platforms/distros also have Oragono packages maintained for them:
61
+Some platforms/distros also have Ergo packages maintained for them:
62 62
 
63 63
 * Arch Linux [AUR](https://aur.archlinux.org/packages/oragono/) - Maintained by [Sean Enck (@enckse)](https://github.com/enckse).
64 64
 
65 65
 ### Using Docker
66 66
 
67 67
 A Dockerfile and example docker-compose recipe are available in the `distrib/docker` directory. Ergo is automatically published
68
-to Docker Hub at [oragono/oragono](https://hub.docker.com/r/oragono/oragono). For more information, see the distrib/docker
68
+to Docker Hub at [ergochat/ergo](https://hub.docker.com/r/ergochat/ergo). For more information, see the distrib/docker
69 69
 [README file](https://github.com/ergochat/ergo/blob/master/distrib/docker/README.md).
70 70
 
71 71
 ### From Source

+ 3
- 3
distrib/docker/docker-compose.yml View File

@@ -1,8 +1,8 @@
1
-version: "3.2"
1
+version: "3.8"
2 2
 
3 3
 services:
4
-  oragono:
5
-    image: oragono/oragono:latest
4
+  ergo:
5
+    image: ergochat/ergo:latest
6 6
     ports:
7 7
       - "6667:6667/tcp"
8 8
       - "6697:6697/tcp"

+ 0
- 3
distrib/docker/run.sh View File

@@ -1,8 +1,5 @@
1 1
 #!/bin/sh
2 2
 
3
-# start in right dir
4
-cd /ircd
5
-
6 3
 # make config file
7 4
 if [ ! -f "/ircd/ircd.yaml" ]; then
8 5
     awk '{gsub(/path: languages/,"path: /ircd-bin/languages")}1' /ircd-bin/default.yaml > /tmp/ircd.yaml

Loading…
Cancel
Save