Sfoglia il codice sorgente

use sed instead of yq, in build step instead of run step

tags/v2.0.0
Shivaram Lingamneni 4 anni fa
parent
commit
c38922005b
1 ha cambiato i file con 6 aggiunte e 8 eliminazioni
  1. 6
    8
      Dockerfile

+ 6
- 8
Dockerfile Vedi File

@@ -1,13 +1,18 @@
1 1
 ## build Oragono
2 2
 FROM golang:1.14-alpine AS build-env
3 3
 
4
-RUN apk add --no-cache git make curl
4
+RUN apk add --no-cache git make curl sed
5 5
 
6 6
 # copy oragono
7 7
 RUN mkdir -p /go/src/github.com/oragono/oragono
8 8
 WORKDIR /go/src/github.com/oragono/oragono
9 9
 ADD . /go/src/github.com/oragono/oragono/
10 10
 
11
+# modify default config file so that it doesn't die on IPv6
12
+# and so it can be exposed via 6667 by default
13
+run sed -i 's/^\(.*\)\"127.0.0.1:6667\":.*$/\1":6667":/' /go/src/github.com/oragono/oragono/oragono.yaml
14
+run sed -i 's/^.*\"\[::1\]:6667\":.*$//' /go/src/github.com/oragono/oragono/oragono.yaml
15
+
11 16
 # make sure submodules are up-to-date
12 17
 RUN git submodule update --init
13 18
 
@@ -37,13 +42,6 @@ COPY --from=build-env /go/bin/oragono /ircd-bin
37 42
 COPY --from=build-env /go/src/github.com/oragono/oragono/languages /ircd-bin/languages/
38 43
 COPY --from=build-env /go/src/github.com/oragono/oragono/oragono.yaml /ircd-bin/oragono.yaml
39 44
 
40
-# modify default config file so that it doesn't die on IPv6
41
-#  and so it can be exposed via 6667 by default
42
-RUN apk add --no-cache python3
43
-RUN apk add --no-cache jq
44
-RUN pip3 install yq
45
-RUN yq -iy 'del(.server.listeners."[::1]:6667") | del(.server.listeners."127.0.0.1:6667") | .server.listeners += {":6667": {}}' /ircd-bin/oragono.yaml
46
-
47 45
 COPY distrib/docker/run.sh /ircd-bin/run.sh
48 46
 RUN chmod +x /ircd-bin/run.sh
49 47
 

Loading…
Annulla
Salva