2017-03-20 23:57:45 +03:00
|
|
|
FROM ubuntu:xenial
|
2017-03-07 19:43:06 +03:00
|
|
|
MAINTAINER Mozilla
|
|
|
|
|
2017-09-29 23:34:46 +03:00
|
|
|
# Builds the MIG base image; this creates an image that has most of the MIG software
|
|
|
|
# compiled with it's default options.
|
|
|
|
|
|
|
|
# See tools/docker_start.sh which is the default CMD entry point for this image.
|
|
|
|
|
2017-03-20 23:57:45 +03:00
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y sudo golang git make \
|
|
|
|
curl rng-tools tmux postgresql rabbitmq-server \
|
2017-09-08 19:50:56 +03:00
|
|
|
libreadline-dev automake autoconf libtool supervisor && \
|
2017-03-07 19:43:06 +03:00
|
|
|
echo '%mig ALL=(ALL:ALL) NOPASSWD:ALL' > /etc/sudoers.d/mig && \
|
2017-03-20 23:57:45 +03:00
|
|
|
groupadd -g 10001 mig && \
|
|
|
|
useradd -g 10001 -u 10001 -d /mig -m mig
|
2017-03-07 19:43:06 +03:00
|
|
|
|
2018-07-11 20:23:51 +03:00
|
|
|
ADD . /go/src/github.com/mozilla/mig
|
2017-03-20 23:57:45 +03:00
|
|
|
RUN chown -R mig /go
|
2017-03-07 19:43:06 +03:00
|
|
|
|
|
|
|
USER mig
|
2017-09-29 23:34:46 +03:00
|
|
|
|
|
|
|
# Build the various tools that are found in a typical MIG environment.
|
2017-03-20 23:57:45 +03:00
|
|
|
RUN export GOPATH=/go && \
|
2018-07-11 20:23:51 +03:00
|
|
|
cd /go/src/github.com/mozilla/mig && \
|
2018-07-11 20:14:54 +03:00
|
|
|
go install github.com/mozilla/mig/mig-agent && \
|
|
|
|
go install github.com/mozilla/mig/mig-api && \
|
|
|
|
go install github.com/mozilla/mig/mig-scheduler && \
|
|
|
|
go install github.com/mozilla/mig/client/mig-console && \
|
|
|
|
go install github.com/mozilla/mig/client/mig && \
|
2018-07-11 20:23:51 +03:00
|
|
|
cp /go/src/github.com/mozilla/mig/tools/docker_start.sh /mig/docker_start.sh && \
|
2017-09-08 19:50:56 +03:00
|
|
|
chmod +x /mig/docker_start.sh
|
2017-03-07 19:43:06 +03:00
|
|
|
|
|
|
|
WORKDIR /mig
|
2017-09-08 19:50:56 +03:00
|
|
|
CMD /mig/docker_start.sh
|