Skip to content

Commit

Permalink
Initial commit for an ubuntu 18.04 based env that can build the SDK
Browse files Browse the repository at this point in the history
An initial docker image that can be used to create the SDK.  The image
has a 'buildkite-agent' user and is intended to be kept small.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
  • Loading branch information
galak committed Jul 10, 2020
0 parents commit e09bbc3
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ubuntu:18.04

WORKDIR /sdk-build

COPY setup.sh .

RUN ./setup.sh && \
useradd -m buildkite-agent --shell /bin/bash --uid 2000 && \
echo 'buildkite-agent ALL = NOPASSWD: ALL' > /etc/sudoers.d/buildkite-agent && \
chmod 0440 /etc/sudoers.d/buildkite-agent

# Set the locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
39 changes: 39 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash -e

apt-get clean
apt-get update

# software-properties for add-apt-repository
# locales for LANG support
# sudo to make life easier when running as build user
# vim.tiny so we have an editor
apt-get install -y --no-install-recommends software-properties-common \
locales sudo vim.tiny

# The package sets are based on Yocto & crosstool-ng docs/references:
#
# Yocto:
# https://www.yoctoproject.org/docs/2.3.4/ref-manual/ref-manual.html#ubuntu-packages
#
# crosstool-ng:
# https://github.com/crosstool-ng/crosstool-ng/blob/master/testing/docker/ubuntu18.04/Dockerfile
apt-get install -y --no-install-recommends gcc g++ gperf bison flex texinfo \
help2man make libncurses5-dev python3-dev autoconf automake libtool \
libtool-bin gawk wget bzip2 xz-utils unzip patch libstdc++6 diffstat \
build-essential chrpath socat cpio python python3 \
python3-pip python3-pexpect debianutils iputils-ping

# Install python3.8-dev for build w/GDB
apt-get install -y --no-install-recommends python3.8-dev

# Install packages for creating SDK packages
apt-get install -y --no-install-recommends makeself p7zip-full tree curl

# Install python packages to allow upload to aws S3
pip3 install setuptools
pip3 install awscli

# Grab a new git
add-apt-repository ppa:git-core/ppa -y
apt-get update
apt-get install git -y

0 comments on commit e09bbc3

Please sign in to comment.