diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml new file mode 100644 index 0000000..bf61af2 --- /dev/null +++ b/.github/workflows/build-ubuntu.yml @@ -0,0 +1,34 @@ +name: Build Ubuntu-22.04 Package + +on: + push: + paths: + - 'Dockerfile-ubuntu' + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Login to GitHub Packages + uses: docker/login-action@v1 + with: + registry: docker.pkg.github.com + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build Docker Image + run: | + docker build -t docker.pkg.github.com/${{ github.repository }}/ubuntu:22.04 -f Dockerfile-ubuntu . + + - name: Push Docker Image + run: | + docker push docker.pkg.github.com/${{ github.repository }}/ubuntu:22.04 diff --git a/Dockerfile-ubuntu b/Dockerfile-ubuntu new file mode 100644 index 0000000..d82cd63 --- /dev/null +++ b/Dockerfile-ubuntu @@ -0,0 +1,80 @@ +FROM ubuntu:22.04 + +LABEL maintainer="Jagan Teki " +LABEL release="ubunutu-22.04" +LABEL description="Ubuntu 22.04 Docker" + +# Set up the non-interactive container build +ARG DEBIAN_FRONTEND=noninteractive + +# Set up locales +RUN apt-get update && apt-get install -y \ + locales sudo && \ + dpkg-reconfigure locales && \ + locale-gen en_US.UTF-8 && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +ENV LANG en_US.utf8 + +# Install essential packages +RUN apt-get update && apt-get install -y \ + apt-utils \ + git \ + bc \ + chrpath \ + cpio \ + diffstat \ + gawk \ + texinfo \ + wget \ + lz4 \ + build-essential \ + fdisk \ + cmake \ + lsb-release \ + vim \ + device-tree-compiler \ + rsync \ + python2 \ + libssl-dev \ + libgmp-dev \ + libmpc-dev \ + flex \ + bison \ + expect \ + expect-dev \ + python-is-python3 \ + python3-pip \ + podman \ + unzip \ + file \ + bsdmainutils \ + dosfstools && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# gdown +RUN pip install gdown kas + +# Install and update ca-certificates +RUN apt-get update && apt-get install -y \ + apt-transport-https \ + ca-certificates && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* && \ + update-ca-certificates + +# Install Java and curl +RUN apt-get update && apt-get install -y \ + default-jre \ + curl && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +RUN useradd -ms /bin/bash build +RUN usermod -aG sudo build +RUN echo "build ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/build + +USER build +WORKDIR /home/build diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8629546 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Jagan Teki + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..117aef4 --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# opendock + +Build Docker Images for building Buildroot/Yocto/Debos based EdgeAIA. + +# Install docker + +First, remove any old versions of Docker if they are installed: +``` +sudo apt remove docker docker-engine docker.io containerd runc +sudo apt update +``` + +Set up Docker's official repository: +``` +sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - +sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" +sudo apt-get update +``` + +Now, install Docker: +``` +sudo apt-get install -y docker-ce docker-ce-cli containerd.io +``` + +Add Your User to the Docker Group: +``` +sudo groupadd docker +sudo usermod -aG docker $USER +``` + +Verify the Installation: +``` +docker run hello-world +``` + +# Run + +Ubuntu 22.04: + +``` +docker run -ti --privileged --net host -v `pwd`:/home/build/shared -w /home/build/shared ghcr.io/edgeble/opendock/ubuntu:22.04 +```