mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Docker support for generating single executable image
This commit is contained in:
7
TODO.md
7
TODO.md
@@ -1,14 +1,15 @@
|
||||
|
||||
|
||||
# General
|
||||
|
||||
- [ ] Syslog support
|
||||
- [ ] SSL/TLS
|
||||
- [ ] nats-top equivalent
|
||||
- [ ] SSL/TLS support
|
||||
- [ ] nats-top equivalent, utils
|
||||
- [ ] Pedantic state
|
||||
- [X] Daemon mode? Won't fix
|
||||
- [ ] Connz report routes
|
||||
- [ ] Info updates contain other implicit route servers
|
||||
- [X] Docker
|
||||
- [ ] brew, apt-get, rpm, chocately (windows)
|
||||
- [ ] Dynamic socket buffer sizes
|
||||
- [ ] Switch to 1.3 and use maps vs hashmaps
|
||||
- [ ] Buffer pools?
|
||||
|
||||
8
docker/Dockerfile
Normal file
8
docker/Dockerfile
Normal file
@@ -0,0 +1,8 @@
|
||||
FROM google/golang:1.3
|
||||
|
||||
MAINTAINER Derek Collison <derek@apcera.com>
|
||||
|
||||
RUN CGO_ENABLED=0 go get -a -ldflags '-s' github.com/apcera/gnatsd
|
||||
COPY Dockerfile.final /gopath/bin/Dockerfile
|
||||
|
||||
CMD docker build -t apcera/gnatsd /gopath/bin
|
||||
10
docker/Dockerfile.final
Normal file
10
docker/Dockerfile.final
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM scratch
|
||||
|
||||
MAINTAINER Derek Collison <derek@apcera.com>
|
||||
|
||||
ADD gnatsd /gnatsd
|
||||
|
||||
CMD []
|
||||
ENTRYPOINT ["/gnatsd", "-p", "4222", "-m", "8333"]
|
||||
|
||||
EXPOSE 4222 8333
|
||||
6
docker/README.md
Normal file
6
docker/README.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# [Dockerized] (http://www.docker.com) [gnatsd](https://registry.hub.docker.com/u/apcera/gnatsd/)
|
||||
|
||||
A docker image for gnatsd. This is created as a single static executable, so there are multiple passes through Docker to first build the static executable and then to package it under an empty (scratch) base image.
|
||||
|
||||
|
||||
|
||||
5
docker/build.sh
Executable file
5
docker/build.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
docker build -t apcera/gnatsd_build .
|
||||
docker run -v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):$(which docker) -ti --name gnatsd_build apcera/gnatsd_build
|
||||
docker rm gnatsd_build
|
||||
docker rmi apcera/gnatsd_build
|
||||
Reference in New Issue
Block a user