xref: /openbmc/phosphor-host-ipmid/.build.sh (revision e9cf1f23)
1#!/bin/bash
2
3Dockerfile=$(cat << EOF
4FROM ubuntu:15.10
5RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get upgrade -yy
6RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -yy make g++ gcc libsystemd-dev libc6-dev pkg-config
7RUN groupadd -g ${GROUPS} ${USER} && useradd -d ${HOME} -m -u ${UID} -g ${GROUPS} ${USER}
8USER ${USER}
9ENV HOME ${HOME}
10RUN /bin/bash
11EOF
12)
13
14docker pull ubuntu:15.10
15docker build -t temp - <<< "${Dockerfile}"
16
17gcc --version
18
19docker run --cap-add=sys_admin --net=host --rm=true --user="${USER}" \
20 -w "${PWD}" -v "${HOME}":"${HOME}" -t temp make
21