github.com/rohankumardubey/nomad@v0.11.8/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  RUN apt-get update; apt-get install -y \
     8              apt-transport-https \
     9              ca-certificates \
    10              curl \
    11              git \
    12              sudo \
    13              tree \
    14              unzip \
    15              wget
    16  
    17  RUN useradd --create-home vagrant \
    18      && echo 'vagrant      ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers
    19  
    20  # install priv packages
    21  COPY ./scripts/vagrant-linux-priv-config.sh /tmp/scripts/vagrant-linux-priv-config.sh
    22  RUN /tmp/scripts/vagrant-linux-priv-config.sh
    23  
    24  COPY ./scripts/vagrant-linux-priv-go.sh /tmp/scripts/vagrant-linux-priv-go.sh
    25  RUN /tmp/scripts/vagrant-linux-priv-go.sh
    26  
    27  COPY ./scripts/vagrant-linux-priv-protoc.sh /tmp/scripts/vagrant-linux-priv-protoc.sh
    28  RUN /tmp/scripts/vagrant-linux-priv-protoc.sh
    29  
    30  USER vagrant
    31  
    32  COPY ./scripts/vagrant-linux-unpriv-ui.sh /tmp/scripts/vagrant-linux-unpriv-ui.sh
    33  RUN /tmp/scripts/vagrant-linux-unpriv-ui.sh
    34  
    35  COPY ./scripts/release/docker-build-all /tmp/scripts/docker-build-all
    36  
    37  # Update PATH with GO bin, yarn, and node
    38  ENV NODE_VERSION=v10.15.3
    39  ENV GOPATH="/opt/gopath" \
    40      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"
    41  
    42  RUN mkdir -p /opt/gopath/src/github.com/hashicorp/nomad
    43  RUN mkdir -p /home/vagrant/bin \
    44      && git config --global user.email "nomad@hashicorp.com" \
    45      && git config --global user.name "Nomad Release Bot"