-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0944510
commit cf5253b
Showing
3 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
Binary file not shown.