open-nomad/scripts/release/Dockerfile

46 lines
1.6 KiB
Docker
Raw Normal View History

# Dockerfile for building nomad binaries
# that mimics Vagrant environment as far as required
# for building the scripts and running provision scripts
FROM ubuntu:16.04
RUN apt-get update; apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
git \
sudo \
tree \
unzip \
wget
RUN useradd --create-home vagrant \
&& echo 'vagrant ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers
# install priv packages
2019-03-15 15:02:52 +00:00
COPY ./scripts/vagrant-linux-priv-config.sh /tmp/scripts/vagrant-linux-priv-config.sh
RUN /tmp/scripts/vagrant-linux-priv-config.sh
2019-03-15 15:02:52 +00:00
COPY ./scripts/vagrant-linux-priv-go.sh /tmp/scripts/vagrant-linux-priv-go.sh
RUN /tmp/scripts/vagrant-linux-priv-go.sh
2019-03-15 15:02:52 +00:00
COPY ./scripts/vagrant-linux-priv-protoc.sh /tmp/scripts/vagrant-linux-priv-protoc.sh
RUN /tmp/scripts/vagrant-linux-priv-protoc.sh
USER vagrant
2019-03-15 15:02:52 +00:00
COPY ./scripts/vagrant-linux-unpriv-ui.sh /tmp/scripts/vagrant-linux-unpriv-ui.sh
RUN /tmp/scripts/vagrant-linux-unpriv-ui.sh
2019-03-15 15:02:52 +00:00
COPY ./scripts/release/docker-build-all /tmp/scripts/docker-build-all
# Update PATH with GO bin, yarn, and node
2019-05-22 18:23:50 +00:00
ENV NODE_VERSION=v10.15.3
ENV GOPATH="/opt/gopath" \
2019-03-18 18:31:31 +00:00
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"
RUN mkdir -p /opt/gopath/src/github.com/hashicorp/nomad
RUN mkdir -p /home/vagrant/bin \
&& git config --global user.email "nomad@hashicorp.com" \
&& git config --global user.name "Nomad Release Bot"