Peter Oostenbach 10 лет назад
Родитель
Сommit
506c361dc2
1 измененных файлов с 13 добавлено и 9 удалено
  1. 13 9
      Dockerfile-go-server

+ 13 - 9
Dockerfile-go-server

@@ -1,19 +1,23 @@
-# Start from a Debian image with the latest version of Go installed
-# and a workspace (GOPATH) configured at /go.
-FROM buildpack-deps:jessie-scm
+# based on animage from activemq with older version, upgraded version.
+FROM activemq:5.12.0
 
 # Copy the local package files to the container's workspace.
 ADD bin/battlecamp-go-server /go/bin/battlecamp-go-server
 
-# Build the outyet command inside the container.
-# (You may fetch or manage dependencies here,
-# either manually or with a tool like "godep".)
-# RUN go install battlecamp-go-server
-
+# set rights
 RUN ["chmod", "755", "/go/bin/battlecamp-go-server"]
 
+# install supervisor
+RUN apt-get update && apt-get install -y supervisor
+RUN mkdir -p /var/log/supervisor
+
+# install our supervisord.conf
+COPY src/battlecamp-go-server/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
+RUN ["chmod", "755", "/etc/supervisor/conf.d/supervisord.conf"]
+
 # Run the battlecamp-go-server command by default when the container starts.
-ENTRYPOINT ["/go/bin/battlecamp-go-server"]
+# ENTRYPOINT ["/go/bin/battlecamp-go-server"]
+CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
 
 # Document that the service listens on port 8080.
 EXPOSE 8080