aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2022-06-03 18:05:31 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2022-06-03 18:05:31 -0700
commitbddd9d4a1c91b174d00a21f14603459d2469aac3 (patch)
tree97c8d935e3bc688f9a52a7da06ef783f1b659d73
parent16a4ad707a05df25c9d12b8cc89fb3a9e3be0dba (diff)
Update Dockerfile and README info
-rw-r--r--Dockerfile9
-rw-r--r--README.md10
2 files changed, 15 insertions, 4 deletions
diff --git a/Dockerfile b/Dockerfile
index 156de2d..5ed9bfc 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,12 +1,13 @@
-FROM golang:1.14
+FROM golang:1.18
WORKDIR /app
COPY . .
-RUN go build -o /app/server/server /app/server/server.go \
+RUN go build -o /app/server/server cmd/mobius-hotline-server/main.go \
&& chmod a+x /app/server/server
-EXPOSE 5500 5501 5502
+EXPOSE 5500 5501
WORKDIR /app/server/
-CMD ["server"] \ No newline at end of file
+CMD ["./server"]
+
diff --git a/README.md b/README.md
index 9597ca3..0a16b2b 100644
--- a/README.md
+++ b/README.md
@@ -59,6 +59,16 @@ Download a compiled release for your architecture from the Releases page
TODO
+### Docker
+
+To run the Mobius server from Docker with a local directory mounted for config and files, follow these steps:
+
+1. Clone this repo: `git clone https://github.com/jhalter/mobius.git`
+2. Copy the config dir somewhere `cp -r cmd/mobius-hotline-server/mobius/config ~/mobius-config`
+3. Build the Docker image: `docker build . -t mobius-hotline-server:latest`
+4. Run the image:
+ `docker run --rm -p 5500:5500 -p 5501:5501 -v ~/mobius-config:/usr/local/var/mobius/config mobius-hotline-server:latest`
+
### Build from source