github.com/thomasobenaus/nomad@v0.11.1/scripts/release/Dockerfile (about)

     1  # Dockerfile for building nomad binaries
     2  # that mimics Vagrant environment as far as required
     3  # for building the scripts and running provision scripts
     4  
     5  FROM ubuntu:16.04
     6  
     7  # use local mirror if possible
     8  RUN sed -i'' 's|deb http://.*.ubuntu.com/ubuntu/|deb mirror://mirrors.ubuntu.com/mirrors.txt|g' /etc/apt/sources.list
     9  
    10  RUN apt-get update; apt-get install -y \
    11              apt-transport-https \
    12              ca-certificates \
    13              curl \
    14              git \
    15              sudo \
    16              tree \
    17              unzip \
    18              wget
    19  
    20  RUN useradd --create-home vagrant \
    21      && echo 'vagrant      ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers
    22  
    23  # install priv packages
    24  COPY ./scripts/vagrant-linux-priv-config.sh /tmp/scripts/vagrant-linux-priv-config.sh
    25  RUN /tmp/scripts/vagrant-linux-priv-config.sh
    26  
    27  COPY ./scripts/vagrant-linux-priv-go.sh /tmp/scripts/vagrant-linux-priv-go.sh
    28  RUN /tmp/scripts/vagrant-linux-priv-go.sh
    29  
    30  COPY ./scripts/vagrant-linux-priv-protoc.sh /tmp/scripts/vagrant-linux-priv-protoc.sh
    31  RUN /tmp/scripts/vagrant-linux-priv-protoc.sh
    32  
    33  USER vagrant
    34  
    35  COPY ./scripts/vagrant-linux-unpriv-ui.sh /tmp/scripts/vagrant-linux-unpriv-ui.sh
    36  RUN /tmp/scripts/vagrant-linux-unpriv-ui.sh
    37  
    38  COPY ./scripts/release/docker-build-all /tmp/scripts/docker-build-all
    39  
    40  # Update PATH with GO bin, yarn, and node
    41  ENV NODE_VERSION=v10.15.3
    42  ENV GOPATH="/opt/gopath" \
    43      PATH="/home/vagrant/.nvm/versions/node/${NODE_VERSION}/bin:/home/vagrant/bin:/opt/gopath/bin:/home/vagrant/.yarn/bin:/home/vagrant/.config/yarn/global/node_modules/.bin:$PATH"
    44  
    45  RUN mkdir -p /opt/gopath/src/github.com/hashicorp/nomad
    46  RUN mkdir -p /home/vagrant/bin \
    47      && git config --global user.email "nomad@hashicorp.com" \
    48      && git config --global user.name "Nomad Release Bot"