├── README.md ├── entrypoint-script ├── gitversion ├── deploy ├── LICENSE └── Dockerfile /README.md: -------------------------------------------------------------------------------- 1 | # docker-yocto-build 2 | A docker image, suitable for building yocto images. 3 | -------------------------------------------------------------------------------- /entrypoint-script: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | useradd -u $USER_ID dummy 5 | mkdir -p /home/dummy/.ssh 6 | su dummy -c "$*" 7 | -------------------------------------------------------------------------------- /gitversion: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIRNAME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | 5 | docker run --rm -v $DIRNAME:/repo gittools/gitversion /overrideconfig tag-prefix=v $@ 6 | -------------------------------------------------------------------------------- /deploy: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | DIRNAME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | 7 | pushd $DIRNAME 8 | 9 | GIT_VERSION_JSON=`./gitversion` 10 | GIT_SEMVAR_VERSION=`echo $GIT_VERSION_JSON | jq '.SemVer' --raw-output` 11 | GIT_VERSION_PRERELEASE_LABEL=`echo $GIT_VERSION_JSON | jq '.PreReleaseLabel' --raw-output` 12 | 13 | if [ -z "$GIT_VERSION_PRERELEASE_LABEL" ]; then 14 | docker tag docker-yocto-build pauldotknopf/docker-yocto-build:latest 15 | fi 16 | docker tag docker-yocto-build pauldotknopf/docker-yocto-build:v$GIT_SEMVAR_VERSION 17 | 18 | docker login --username $DOCKER_LOGIN_USERNAME --password $DOCKER_LOGIN_PASSWORD 19 | 20 | if [ -z "$GIT_VERSION_PRERELEASE_LABEL" ]; then 21 | docker push pauldotknopf/docker-yocto-build:latest 22 | fi 23 | docker push pauldotknopf/docker-yocto-build:v$GIT_SEMVAR_VERSION 24 | 25 | popd 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Paul Knopf 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:xenial 2 | 3 | RUN apt-get update 4 | 5 | RUN apt-get install -q -y software-properties-common curl && \ 6 | add-apt-repository ppa:git-core/ppa && \ 7 | curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \ 8 | apt-get install -q -y git-lfs && \ 9 | git lfs install 10 | 11 | RUN apt-get install -q -y gawk wget git-core diffstat unzip texinfo gcc-multilib \ 12 | build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \ 13 | xz-utils debianutils iputils-ping libsdl1.2-dev xterm git-lfs 14 | 15 | # Install gitversion 16 | RUN apt-get install -q -y mono-complete ca-certificates-mono libcurl3 17 | RUN mkdir -p /usr/local/bin/mono/NuGet && \ 18 | wget -O /usr/local/bin/mono/NuGet/nuget.exe https://dist.nuget.org/win-x86-commandline/v4.5.0/nuget.exe && \ 19 | echo "#!/bin/bash" | tee /usr/local/bin/nuget && \ 20 | echo "exec $(which mono) /usr/local/bin/mono/NuGet/nuget.exe \"\$@\"" | tee -a /usr/local/bin/nuget && \ 21 | chmod +x /usr/local/bin/nuget 22 | RUN mkdir -p /usr/local/bin/mono/GitVersion && \ 23 | wget -O /usr/local/bin/mono/GitVersion/gitversion.zip https://www.nuget.org/api/v2/package/GitVersion.CommandLine/4.0.0-beta0012 && \ 24 | unzip /usr/local/bin/mono/GitVersion/gitversion.zip -d /usr/local/bin/mono/GitVersion && \ 25 | echo "#!/bin/bash" | tee /usr/local/bin/gitversion && \ 26 | echo "exec $(which mono) /usr/local/bin/mono/GitVersion/tools/GitVersion.exe \"\$@\"" | tee -a /usr/local/bin/gitversion && \ 27 | chmod +x /usr/local/bin/gitversion 28 | 29 | # Fix error "Please use a locale setting which supports utf-8." 30 | # See https://wiki.yoctoproject.org/wiki/TipsAndTricks/ResolvingLocaleIssues 31 | RUN apt-get install -y locales 32 | RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ 33 | echo 'LANG="en_US.UTF-8"'>/etc/default/locale && \ 34 | dpkg-reconfigure --frontend=noninteractive locales && \ 35 | update-locale LANG=en_US.UTF-8 36 | 37 | ENV LC_ALL en_US.UTF-8 38 | ENV LANG en_US.UTF-8 39 | ENV LANGUAGE en_US.UTF-8 40 | 41 | RUN apt-get clean 42 | 43 | # When building the kernel, this is needed 44 | RUN git config --system user.email "nobody@nobody.com" 45 | RUN git config --system user.name "No Body" 46 | 47 | # For when bitbake needs a terminal 48 | RUN apt-get install -y -q screen 49 | 50 | RUN echo "StrictHostKeyChecking=no" | tee -a /etc/ssh/ssh_config 51 | 52 | ADD entrypoint-script / 53 | 54 | ENTRYPOINT ["/entrypoint-script"] 55 | --------------------------------------------------------------------------------