Skip to content

Instantly share code, notes, and snippets.

@gnue
Last active August 29, 2015 13:56
Show Gist options
  • Save gnue/8954141 to your computer and use it in GitHub Desktop.
Save gnue/8954141 to your computer and use it in GitHub Desktop.
goreman を使って docker で複数プロセスを起動する
# sshd+nginx
#
# VERSION 0.0.1
FROM ubuntu
RUN apt-get update
# sshd
RUN apt-get install -y openssh-server
RUN mkdir /var/run/sshd
RUN echo "root:foobar" | chpasswd
EXPOSE 22
# nginx
RUN apt-get install -y nginx
RUN echo "\ndaemon off;" >> /etc/nginx/nginx.conf
EXPOSE 80
# goreman
ADD goreman-linux64 /usr/local/bin/goreman
ADD Procfile /root/launch/Procfile
WORKDIR /root/launch
CMD ["goreman", "start"]
web: nginx
sshd: /usr/sbin/sshd -D
@gnue
Copy link
Author

gnue commented Feb 12, 2014

goreman を linux で使えるようにクロスコンパイルしておくこと

$ GOOS=linux GOARCH=amd64 go build -o goreman-linux64 github.com/mattn/goreman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment