mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-23 19:22:41 +01:00
Merge pull request #1683 from dallemon/master
update dockerfile and minor changes
This commit is contained in:
commit
97d1786378
1
.gitignore
vendored
1
.gitignore
vendored
@ -110,3 +110,4 @@ ergo.prof
|
|||||||
ergo.mprof
|
ergo.mprof
|
||||||
/dist
|
/dist
|
||||||
*.pem
|
*.pem
|
||||||
|
.dccache
|
40
Dockerfile
40
Dockerfile
@ -1,46 +1,36 @@
|
|||||||
## build Ergo
|
## build ergo binary
|
||||||
FROM golang:1.16-alpine AS build-env
|
FROM golang:1.16-alpine AS build-env
|
||||||
|
|
||||||
RUN apk add --no-cache git make curl sed
|
RUN apk add -U --force-refresh --no-cache --purge --clean-protected -l -u make
|
||||||
|
|
||||||
# copy ergo
|
# copy ergo source
|
||||||
RUN mkdir -p /go/src/github.com/ergochat/ergo
|
|
||||||
WORKDIR /go/src/github.com/ergochat/ergo
|
WORKDIR /go/src/github.com/ergochat/ergo
|
||||||
ADD . /go/src/github.com/ergochat/ergo/
|
COPY . .
|
||||||
|
|
||||||
# modify default config file so that it doesn't die on IPv6
|
# modify default config file so that it doesn't die on IPv6
|
||||||
# and so it can be exposed via 6667 by default
|
# and so it can be exposed via 6667 by default
|
||||||
run sed -i 's/^\(\s*\)\"127.0.0.1:6667\":.*$/\1":6667":/' /go/src/github.com/ergochat/ergo/default.yaml
|
RUN sed -i 's/^\(\s*\)\"127.0.0.1:6667\":.*$/\1":6667":/' /go/src/github.com/ergochat/ergo/default.yaml && \
|
||||||
run sed -i 's/^\s*\"\[::1\]:6667\":.*$//' /go/src/github.com/ergochat/ergo/default.yaml
|
sed -i 's/^\s*\"\[::1\]:6667\":.*$//' /go/src/github.com/ergochat/ergo/default.yaml
|
||||||
|
|
||||||
# compile
|
# compile
|
||||||
RUN make
|
RUN make
|
||||||
|
|
||||||
|
## build ergo container
|
||||||
|
FROM alpine:3.13
|
||||||
## run Ergo
|
|
||||||
FROM alpine:3.9
|
|
||||||
|
|
||||||
# metadata
|
# metadata
|
||||||
LABEL maintainer="daniel@danieloaks.net"
|
LABEL maintainer="Daniel Oaks <daniel@danieloaks.net>,Daniel Thamdrup <dallemon@protonmail.com>" \
|
||||||
LABEL description="Ergo is a modern, experimental IRC server written in Go"
|
description="Ergo is a modern, experimental IRC server written in Go"
|
||||||
|
|
||||||
# install latest updates and configure alpine
|
|
||||||
RUN apk update
|
|
||||||
RUN apk upgrade
|
|
||||||
RUN mkdir /lib/modules
|
|
||||||
|
|
||||||
# standard ports listened on
|
# standard ports listened on
|
||||||
EXPOSE 6667/tcp 6697/tcp
|
EXPOSE 6667/tcp 6697/tcp
|
||||||
|
|
||||||
# oragono itself
|
# ergo itself
|
||||||
RUN mkdir -p /ircd-bin
|
COPY --from=build-env /go/bin/ergo \
|
||||||
COPY --from=build-env /go/bin/ergo /ircd-bin
|
/go/src/github.com/ergochat/ergo/default.yaml \
|
||||||
|
/go/src/github.com/ergochat/ergo/distrib/docker/run.sh \
|
||||||
|
/ircd-bin/
|
||||||
COPY --from=build-env /go/src/github.com/ergochat/ergo/languages /ircd-bin/languages/
|
COPY --from=build-env /go/src/github.com/ergochat/ergo/languages /ircd-bin/languages/
|
||||||
COPY --from=build-env /go/src/github.com/ergochat/ergo/default.yaml /ircd-bin/default.yaml
|
|
||||||
|
|
||||||
COPY distrib/docker/run.sh /ircd-bin/run.sh
|
|
||||||
RUN chmod +x /ircd-bin/run.sh
|
|
||||||
|
|
||||||
# running volume holding config file, db, certs
|
# running volume holding config file, db, certs
|
||||||
VOLUME /ircd
|
VOLUME /ircd
|
||||||
|
@ -58,14 +58,14 @@ ergo run # server should be ready to go!
|
|||||||
|
|
||||||
### Platform Packages
|
### Platform Packages
|
||||||
|
|
||||||
Some platforms/distros also have Oragono packages maintained for them:
|
Some platforms/distros also have Ergo packages maintained for them:
|
||||||
|
|
||||||
* Arch Linux [AUR](https://aur.archlinux.org/packages/oragono/) - Maintained by [Sean Enck (@enckse)](https://github.com/enckse).
|
* Arch Linux [AUR](https://aur.archlinux.org/packages/oragono/) - Maintained by [Sean Enck (@enckse)](https://github.com/enckse).
|
||||||
|
|
||||||
### Using Docker
|
### Using Docker
|
||||||
|
|
||||||
A Dockerfile and example docker-compose recipe are available in the `distrib/docker` directory. Ergo is automatically published
|
A Dockerfile and example docker-compose recipe are available in the `distrib/docker` directory. Ergo is automatically published
|
||||||
to Docker Hub at [oragono/oragono](https://hub.docker.com/r/oragono/oragono). For more information, see the distrib/docker
|
to Docker Hub at [ergochat/ergo](https://hub.docker.com/r/ergochat/ergo). For more information, see the distrib/docker
|
||||||
[README file](https://github.com/ergochat/ergo/blob/master/distrib/docker/README.md).
|
[README file](https://github.com/ergochat/ergo/blob/master/distrib/docker/README.md).
|
||||||
|
|
||||||
### From Source
|
### From Source
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
version: "3.2"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
oragono:
|
ergo:
|
||||||
image: oragono/oragono:latest
|
image: ergochat/ergo:latest
|
||||||
ports:
|
ports:
|
||||||
- "6667:6667/tcp"
|
- "6667:6667/tcp"
|
||||||
- "6697:6697/tcp"
|
- "6697:6697/tcp"
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# start in right dir
|
|
||||||
cd /ircd
|
|
||||||
|
|
||||||
# make config file
|
# make config file
|
||||||
if [ ! -f "/ircd/ircd.yaml" ]; then
|
if [ ! -f "/ircd/ircd.yaml" ]; then
|
||||||
awk '{gsub(/path: languages/,"path: /ircd-bin/languages")}1' /ircd-bin/default.yaml > /tmp/ircd.yaml
|
awk '{gsub(/path: languages/,"path: /ircd-bin/languages")}1' /ircd-bin/default.yaml > /tmp/ircd.yaml
|
||||||
|
Loading…
Reference in New Issue
Block a user