diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml new file mode 100644 index 0000000..c4079d2 --- /dev/null +++ b/.github/workflows/build-docker.yml @@ -0,0 +1,36 @@ +name: Embedded Gateway Builder + +on: + workflow_dispatch: + push: + branches: + - main + - work/image-builder + paths: + - .github/workflows/build-docker.yml + - Dockerfile + +jobs: + build: + name: Build and push embedded-gateway-builder image + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Clone + uses: actions/checkout@v4 + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: https://ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push embedded-gateway-builder to GitHub Packages + uses: docker/build-push-action@v6 + with: + push: false + tags: ghcr.io/wirepas/embedded-gateway-builder:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7208804 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,42 @@ +FROM ubuntu:24.04 +# Use the 20.04 LTS release instead of latest to have stable environement + +# Create a default Wirepas user +ARG user=wirepas +RUN useradd -ms /bin/bash ${user} + +# Install python3, pip and wget +RUN apt-get update \ + && apt-get install -y \ + bzip2 \ + cmake \ + curl \ + libglib2.0-0 \ + ninja-build \ + python3 \ + git \ + && rm -fr /var/libapt/lists/* + +WORKDIR /home/${user} + +COPY libicu55_55.1-7ubuntu0.5_amd64.deb libicu55_55.1-7ubuntu0.5_amd64.deb +RUN apt install ./libicu55_55.1-7ubuntu0.5_amd64.deb && rm ./libicu55_55.1-7ubuntu0.5_amd64.deb + +# Install Arm compiler +RUN curl -Lso gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2 "https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/7-2017q4/gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2" \ + && tar xjf gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2 -C /opt/ \ + && rm -f gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2 + +# Add Gcc 7 compiler to default path +ENV PATH="/opt/gcc-arm-none-eabi-7-2017-q4-major/bin:${PATH}" + +RUN apt-get update \ + && apt-get install -y \ + libglib2.0-0 \ + && rm -fr /var/libapt/lists/* + +# No need to be root anymore +USER ${user} + +# Default to bash console +CMD ["/bin/bash"] diff --git a/libicu55_55.1-7ubuntu0.5_amd64.deb b/libicu55_55.1-7ubuntu0.5_amd64.deb new file mode 100755 index 0000000..032bae1 Binary files /dev/null and b/libicu55_55.1-7ubuntu0.5_amd64.deb differ