Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
e3a479e
dockerfile linting
mat83 Nov 11, 2024
6af0480
compose file linrting
mat83 Nov 11, 2024
c0b4386
lynt start script for xkiosk
mat83 Nov 12, 2024
3c559bd
restart xkiosk when not stoped
mat83 Nov 12, 2024
3f9ba75
lint dockerfile for xkiosk
mat83 Nov 12, 2024
60a01f9
add README to xkiosk
mat83 Nov 12, 2024
f193070
Merge remote-tracking branch 'remotes/mattia/feature/add-readme-to-ap…
mat83 Nov 12, 2024
018949b
add env to compose file
mat83 Nov 12, 2024
0ad2315
pass address to command variable
mat83 Nov 12, 2024
2aa2f9e
pass website using the command value
mat83 Nov 12, 2024
2e5fd9d
Add README to xkiosk
mat83 Nov 12, 2024
0a1cf95
start script linting
mat83 Nov 12, 2024
020f10b
dockerfile linting
mat83 Nov 12, 2024
59260ba
specify address on command
mat83 Nov 12, 2024
895e5a2
add readme file for xkiosk-x8
mat83 Nov 12, 2024
87f5086
add readme on flask webserver
mat83 Nov 12, 2024
f851418
dockerfile linting
mat83 Nov 12, 2024
8fae1df
compose file linting
mat83 Nov 12, 2024
6a5fbe7
rename service on compose file
mat83 Nov 12, 2024
799ba07
update service name on xkiosk
mat83 Nov 12, 2024
11ea93d
dockerfile linting
mat83 Nov 12, 2024
1a8ce80
compose file linting
mat83 Nov 12, 2024
079b2d5
dockerfile linting
mat83 Nov 12, 2024
3af18da
compose file linting rpc serial
mat83 Nov 12, 2024
ccbf1d6
rename readme
mat83 Nov 12, 2024
4b7ff52
dockerfile linting
mat83 Nov 12, 2024
034b8af
compose file linting
mat83 Nov 12, 2024
d415848
rename python-rpc-serial to m4-serial-forward
mat83 Nov 13, 2024
c41a963
rename app in compose file
mat83 Nov 13, 2024
ae5c9fa
add readme file
mat83 Nov 13, 2024
5800c12
dockerfile linting
mat83 Nov 13, 2024
7a5985f
lint compose file
mat83 Nov 13, 2024
dcf5250
rename python-rpc-serial to m4-sensors-read
mat83 Nov 13, 2024
f7f70b0
dockerfile linting
mat83 Nov 13, 2024
1db2414
rename app in compose
mat83 Nov 13, 2024
7644ab9
add readme.md
mat83 Nov 13, 2024
4c04d9a
lint dockerfile
mat83 Nov 13, 2024
21fbb9b
chmod +x bluescanner.py
mat83 Nov 13, 2024
f47dff7
compose file linting
mat83 Nov 13, 2024
ce2a1ea
add readme.md
mat83 Nov 13, 2024
59955ca
dockerfile linting
mat83 Nov 13, 2024
02c37e3
add readme
mat83 Nov 13, 2024
4993a59
rename nodered_app to nodered: it is an image definition and not a do…
mat83 Nov 13, 2024
e14a666
docker compose linting
mat83 Nov 13, 2024
8aca02a
add readme.md
mat83 Nov 13, 2024
7861690
add readme
mat83 Nov 13, 2024
5a0d989
dockerfile linting
mat83 Nov 13, 2024
1110f41
linting of compose file
mat83 Nov 13, 2024
5f8f98c
chmod scripts
mat83 Nov 13, 2024
499b483
compose file linting
mat83 Nov 13, 2024
aeefa28
dockerfile lint
mat83 Nov 13, 2024
a414780
add readme.md
mat83 Nov 13, 2024
4a84116
lint dockerfile
mat83 Nov 13, 2024
3c7c178
rename image in compose file
mat83 Nov 13, 2024
5d8e1de
rename m4 serial forward addi python
mat83 Nov 14, 2024
3e330ee
rename app in compose
mat83 Nov 14, 2024
47b6934
rename go rpc serial
mat83 Nov 14, 2024
8fee271
add readme.md
mat83 Nov 14, 2024
8cad24a
docekrfile linting
mat83 Nov 14, 2024
55f2f78
rename mod-ui
mat83 Nov 14, 2024
5cadb60
compose file linting
mat83 Nov 14, 2024
18f25b5
add readme
mat83 Nov 14, 2024
c842120
rename python rpc proxy
mat83 Nov 14, 2024
703649f
compose file linting
mat83 Nov 14, 2024
ed568c5
rename go rpc proxy
mat83 Nov 14, 2024
f8aab4c
dockerfile lint
mat83 Nov 14, 2024
e65d0d7
compose file linting
mat83 Nov 14, 2024
0b67a11
lint dockerfile
mat83 Nov 14, 2024
61abedc
lint compose file
mat83 Nov 14, 2024
ada4647
dockerfile lint
mat83 Nov 14, 2024
4d78f46
lint compose file
mat83 Nov 14, 2024
a4c4f81
add description to readme
mat83 Nov 14, 2024
851902f
rename readme
mat83 Nov 14, 2024
b66a89c
link docker file
mat83 Nov 14, 2024
5c2a168
lint dockerfile
mat83 Nov 14, 2024
752a814
add readme
mat83 Nov 14, 2024
37229e4
compose file linting
mat83 Nov 14, 2024
016a887
add readme
mat83 Nov 14, 2024
88e34f6
add readme
mat83 Nov 15, 2024
3eb6067
dockerfile linting
mat83 Nov 15, 2024
fe512ed
restore container_name
mat83 Nov 15, 2024
840fbea
Add readme.md
mat83 Nov 18, 2024
fb195b8
Add readme.md
mat83 Nov 18, 2024
0a5c1dc
put python code in project directory instead of cloning it
mat83 Nov 18, 2024
196aed6
add test py
mat83 Nov 18, 2024
3c7c83d
Put code in working directory
mat83 Nov 18, 2024
3191018
add application code
mat83 Nov 18, 2024
cea470d
remove clone instruction from dockerfile
mat83 Nov 18, 2024
6f107d1
add source code in dockerfile instead of cloning
mat83 Nov 18, 2024
ca84409
add application code
mat83 Nov 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 47 additions & 40 deletions arduino-iot-cloud-provisioning/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,57 +1,72 @@
# Copyright (c) 2022 Arduino.cc
#

FROM golang:1.16.13-alpine3.15 AS build-arduino-cloud-cli
FROM golang:1.16-alpine AS build-arduino-cloud-cli

WORKDIR /go/src
RUN set -ex \
&& apk --no-cache add git \
&& git clone -b 0.1.1 https://github.com/arduino/arduino-cloud-cli.git \
&& cd arduino-cloud-cli \
&& go build -o /go/bin/arduino-cloud-cli .
RUN apk update \
&& apk --no-cache add git \
&& git clone -b 0.1.1 https://github.com/arduino/arduino-cloud-cli.git \
&& cd arduino-cloud-cli \
&& go build -o /go/bin/arduino-cloud-cli .

FROM golang:1.19-alpine as build-go-app

FROM golang:1.19-alpine3.16 as build-go-app
WORKDIR /go/src

ADD ./api /go/src
RUN go mod download
RUN go build -o /go/bin/x8-aiotcp-api .

RUN go mod download \
&& go build -o /go/bin/x8-aiotcp-api .

FROM eclipse-mosquitto:2.0.13 AS op_tee_build

# A bit ahead of 3.15.0, to include support for secure element control (used by SE05X)
ENV OPTEE_CLIENT_VER "f4f54e5a76641fda22a49f00294771f948cd4c92"

# build TEE client and headers
RUN apk --no-cache add --virtual build-deps git build-base linux-headers &&\
git clone https://github.com/OP-TEE/optee_client.git &&\
cd optee_client && git checkout ${OPTEE_CLIENT_VER} &&\
git config --global user.email "you@example.com" &&\
git config --global user.name "Your Name" &&\
wget https://raw.githubusercontent.com/foundriesio/meta-lmp/101b2fcad5d762e70205ae10219eb4e063af59a9/meta-lmp-base/recipes-security/optee/optee-client/0001-FIO-extras-pkcs11-change-UUID-to-avoid-conflict-with.patch &&\
git am 0001-FIO-extras-pkcs11-change-UUID-to-avoid-conflict-with.patch &&\
wget https://raw.githubusercontent.com/foundriesio/meta-lmp/101b2fcad5d762e70205ae10219eb4e063af59a9/meta-lmp-base/recipes-security/optee/optee-client/0001-libckteec-add-support-for-ECDH-derive.patch &&\
git am 0001-libckteec-add-support-for-ECDH-derive.patch &&\
make -C libteec/ && make -C libseteec && make -C libckteec
RUN apk --no-cache add --virtual build-deps build-base git linux-headers \
&& git clone https://github.com/OP-TEE/optee_client.git \
&& cd optee_client \
&& git checkout ${OPTEE_CLIENT_VER} \
&& git config --global user.email "you@example.com" \
&& git config --global user.name "Your Name" \
&& wget https://raw.githubusercontent.com/foundriesio/meta-lmp/101b2fcad5d762e70205ae10219eb4e063af59a9/meta-lmp-base/recipes-security/optee/optee-client/0001-FIO-extras-pkcs11-change-UUID-to-avoid-conflict-with.patch \
&& git am 0001-FIO-extras-pkcs11-change-UUID-to-avoid-conflict-with.patch \
&& wget https://raw.githubusercontent.com/foundriesio/meta-lmp/101b2fcad5d762e70205ae10219eb4e063af59a9/meta-lmp-base/recipes-security/optee/optee-client/0001-libckteec-add-support-for-ECDH-derive.patch \
&& git am 0001-libckteec-add-support-for-ECDH-derive.patch \
&& make -C libteec/ \
&& make -C libseteec \
&& make -C libckteec

# build libp11
FROM eclipse-mosquitto:2.0.13 AS p11_build

ENV LIBP11_VERSION=0.4.11

RUN apk --no-cache add --virtual .build-deps autoconf automake build-base gettext openssl-dev libtool m4 readline-dev zlib-dev curl
RUN curl -fsL https://github.com/OpenSC/libp11/releases/download/libp11-${LIBP11_VERSION}/libp11-${LIBP11_VERSION}.tar.gz -o libp11-${LIBP11_VERSION}.tar.gz &&\
tar -zxf libp11-${LIBP11_VERSION}.tar.gz &&\
rm libp11-${LIBP11_VERSION}.tar.gz &&\
cd libp11-${LIBP11_VERSION} &&\
./configure &&\
make &&\
make install

RUN curl -fsL https://github.com/OpenSC/libp11/releases/download/libp11-${LIBP11_VERSION}/libp11-${LIBP11_VERSION}.tar.gz -o libp11-${LIBP11_VERSION}.tar.gz \
&& tar -zxf libp11-${LIBP11_VERSION}.tar.gz \
&& rm libp11-${LIBP11_VERSION}.tar.gz \
&& cd libp11-${LIBP11_VERSION} \
&& ./configure \
&& make \
&& make install

# copy data to final container
FROM python:3.9-alpine3.16
FROM python:3.9-alpine

LABEL maintainer="Mattia Pennasilico <m.pennasilico@arduino.cc>"

# install openssl1.1-compat
RUN apk add --no-cache openssl openssl-dev
RUN apk add --no-cache \
gnutls-utils \
curl \
jq \
opensc \
openssl \
openssl-dev

# copy libtee
COPY --from=op_tee_build /optee_client/out/libteec/libteec.so* /usr/lib/
Expand All @@ -61,19 +76,9 @@ COPY --from=op_tee_build /optee_client/public/*.h /usr/include/

# copy libp11
COPY --from=p11_build /usr/lib/engines-1.1/pkcs11.so /usr/lib/engines-1.1/pkcs11.so
RUN set -ex \
&& cd /usr/lib/engines-1.1 \
&& ln -s -f pkcs11.so libpkcs11.so

# install additional tools
RUN set -ex \
&& apk --no-cache add opensc gnutls-utils curl openssl

COPY ./iot-config.template /root/iot-config.template

# install tool to parse json files from cmd line
RUN set -ex \
&& apk add --no-cache jq
RUN cd /usr/lib/engines-1.1 \
&& ln -s -f pkcs11.so libpkcs11.so

# install arduino-cloud-cli
COPY --from=build-arduino-cloud-cli /go/bin/arduino-cloud-cli /usr/bin/arduino-cloud-cli
Expand Down Expand Up @@ -101,4 +106,6 @@ COPY --from=build-go-app /go/bin/x8-aiotcp-api /
# entrypoint
COPY ./entrypoint.sh /
RUN chmod 700 /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]

8 changes: 5 additions & 3 deletions arduino-iot-cloud-provisioning/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: arduino-cloud-provisioning

services:
arduino-iot-cloud-provisioning:

iot-cloud-provisioning:
container_name: arduino-iot-cloud-provisioning
image: hub.foundries.io/${FACTORY}/arduino-iot-cloud-provisioning:latest
restart: unless-stopped
tty: true
read_only: false
user: "0"
environment:
- 'DBUS_SYSTEM_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket'
Expand All @@ -14,3 +15,4 @@ services:
- '/var:/var/secrets'
devices:
- '/dev/tee0'

142 changes: 83 additions & 59 deletions arduino-ootb-python-devel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,89 +7,114 @@ FROM eclipse-mosquitto:2.0.13 AS op_tee_build
ENV OPTEE_CLIENT_VER "f4f54e5a76641fda22a49f00294771f948cd4c92"

# build TEE client and headers
RUN apk --no-cache add --virtual build-deps git build-base linux-headers &&\
git clone https://github.com/OP-TEE/optee_client.git &&\
cd optee_client && git checkout ${OPTEE_CLIENT_VER} &&\
git config --global user.email "you@example.com" &&\
git config --global user.name "Your Name" &&\
wget https://raw.githubusercontent.com/foundriesio/meta-lmp/101b2fcad5d762e70205ae10219eb4e063af59a9/meta-lmp-base/recipes-security/optee/optee-client/0001-FIO-extras-pkcs11-change-UUID-to-avoid-conflict-with.patch &&\
git am 0001-FIO-extras-pkcs11-change-UUID-to-avoid-conflict-with.patch &&\
wget https://raw.githubusercontent.com/foundriesio/meta-lmp/101b2fcad5d762e70205ae10219eb4e063af59a9/meta-lmp-base/recipes-security/optee/optee-client/0001-libckteec-add-support-for-ECDH-derive.patch &&\
git am 0001-libckteec-add-support-for-ECDH-derive.patch &&\
make -C libteec/ && make -C libseteec && make -C libckteec
RUN apk --no-cache add --virtual build-deps \
build-base \
git \
linux-headers \
&& git clone https://github.com/OP-TEE/optee_client.git \
&& cd optee_client \
&& git checkout ${OPTEE_CLIENT_VER} \
&& git config --global user.email "you@example.com" \
&& git config --global user.name "Your Name" \
&& wget https://raw.githubusercontent.com/foundriesio/meta-lmp/101b2fcad5d762e70205ae10219eb4e063af59a9/meta-lmp-base/recipes-security/optee/optee-client/0001-FIO-extras-pkcs11-change-UUID-to-avoid-conflict-with.patch \
&& git am 0001-FIO-extras-pkcs11-change-UUID-to-avoid-conflict-with.patch \
&& wget https://raw.githubusercontent.com/foundriesio/meta-lmp/101b2fcad5d762e70205ae10219eb4e063af59a9/meta-lmp-base/recipes-security/optee/optee-client/0001-libckteec-add-support-for-ECDH-derive.patch \
&& git am 0001-libckteec-add-support-for-ECDH-derive.patch \
&& make -C libteec/ \
&& make -C libseteec \
&& make -C libckteec

# build libp11
FROM eclipse-mosquitto:2.0.13 AS p11_build

ENV LIBP11_VERSION=0.4.11

RUN apk --no-cache add --virtual .build-deps autoconf automake build-base gettext openssl-dev libtool m4 readline-dev zlib-dev curl
RUN curl -fsL https://github.com/OpenSC/libp11/releases/download/libp11-${LIBP11_VERSION}/libp11-${LIBP11_VERSION}.tar.gz -o libp11-${LIBP11_VERSION}.tar.gz &&\
tar -zxf libp11-${LIBP11_VERSION}.tar.gz &&\
rm libp11-${LIBP11_VERSION}.tar.gz &&\
cd libp11-${LIBP11_VERSION} &&\
./configure &&\
make &&\
make install
RUN apk --no-cache add --virtual .build-deps \
autoconf \
automake \
build-base \
curl \
gettext \
libtool \
m4 \
openssl-dev \
readline-dev \
zlib-dev

RUN curl -fsL https://github.com/OpenSC/libp11/releases/download/libp11-${LIBP11_VERSION}/libp11-${LIBP11_VERSION}.tar.gz -o libp11-${LIBP11_VERSION}.tar.gz \
&& tar -zxf libp11-${LIBP11_VERSION}.tar.gz \
&& rm libp11-${LIBP11_VERSION}.tar.gz \
&& cd libp11-${LIBP11_VERSION} \
&& ./configure \
&& make \
&& make install

# build kpn senml
FROM python:3.9-alpine3.16 AS kpn_senml_build

RUN set -ex \
&& apk add --no-cache --virtual .build-dep \
git build-base python3-dev

RUN set -ex \
&& git clone https://github.com/kpn-iot/senml-python-library \
&& cd senml-python-library \
&& git checkout 562ab57920a7abe4b2f960a58b403966d065241b \
&& python3 setup.py bdist_wheel \
&& cd ..
RUN apk add --no-cache --virtual .build-dep build-base git python3-dev

RUN set -ex \
&& apk del .build-dep
RUN git clone https://github.com/kpn-iot/senml-python-library \
&& cd senml-python-library \
&& git checkout 562ab57920a7abe4b2f960a58b403966d065241b \
&& python3 setup.py bdist_wheel \
&& cd ..

# build m2crypto
FROM python:3.9-alpine3.16 AS m2crypto_build
RUN set -ex \
&& apk add --no-cache --virtual -build-dep \
build-base python3-dev openssl-dev swig

RUN set -ex \
&& pip3 wheel M2Crypto==0.38.0 --wheel-dir=/
RUN apk add --no-cache --virtual -build-dep \
build-base \
python3-dev \
openssl-dev \
swig

RUN pip3 wheel M2Crypto==0.38.0 --wheel-dir=/

# build portenta-x8-eeprom-utils
FROM python:3.9-alpine3.16 as eeprom_utils_build

RUN apk add git g++ make cmake

RUN git clone https://github.com/pika-spark/portenta-x8-eeprom-utils && \
cd portenta-x8-eeprom-utils && \
mkdir build && \
cd build && \
cmake .. && \
cmake --build .
RUN git clone https://github.com/pika-spark/portenta-x8-eeprom-utils \
&& cd portenta-x8-eeprom-utils \
&& mkdir build && \
&& cd build \
&& cmake ..\
&& cmake --build .

# copy data to final container
FROM python:3.9-alpine3.16

LABEL maintainer="Mattia Pennasilico <m.pennasilico@arduino.cc>"

# install openssl1.1-compat and other required packages
RUN apk add --no-cache openssl openssh-client openssl-dev dropbear nano git newt pciutils

RUN apk add --no-cache alpine-sdk cmake linux-headers zlib-dev bsd-compat-headers
RUN apk add --no-cache \
alpine-sdk \
bsd-compat-headers \
cmake \
dropbear \
git \
linux-headers \
nano \
newt \
pciutils \
openssl \
openssh-client \
openssl-dev \
zlib-dev

# install libubootenv to the correct version (0.3.2)
RUN git clone --depth 1 --branch v0.3.2 https://github.com/sbabic/libubootenv.git && \
cd libubootenv && \
mkdir build && \
cd build && \
cmake .. && \
cmake --build . && \
make install && \
apk del alpine-sdk cmake linux-headers zlib-dev bsd-compat-headers && \
cd ../../ && \
rm -rf libubootenv
RUN git clone --depth 1 --branch v0.3.2 https://github.com/sbabic/libubootenv.git \
&& cd libubootenv \
&& mkdir build \
&& cd build \
&& cmake ..\
&& cmake --build . \
&& make install \
&& apk del alpine-sdk cmake linux-headers zlib-dev bsd-compat-headers \
&& cd ../../
&& rm -rf libubootenv

# copy libtee
COPY --from=op_tee_build /optee_client/out/libteec/libteec.so* /usr/lib/
Expand All @@ -99,9 +124,9 @@ COPY --from=op_tee_build /optee_client/public/*.h /usr/include/

# copy libp11
COPY --from=p11_build /usr/lib/engines-1.1/pkcs11.so /usr/lib/engines-1.1/pkcs11.so
RUN set -ex \
&& cd /usr/lib/engines-1.1 \
&& ln -s -f pkcs11.so libpkcs11.so

RUN cd /usr/lib/engines-1.1 \
&& ln -s -f pkcs11.so libpkcs11.so

# copy kpn senml library
COPY --from=kpn_senml_build /senml-python-library/dist/kpn_senml-1.1.1-py3-none-any.whl /tmp
Expand All @@ -121,7 +146,6 @@ RUN pip3 install --find-links=/tmp --no-index M2Crypto
RUN pip3 install /tmp/kpn_senml-1.1.1-py3-none-any.whl

# install aiotcloud library
#RUN pip3 install https://github.com/bcmi-labs/python-aiotcloud/releases/download/v0.0.2/arduino_iot_cloud-0.0.2-py3-none-any.whl \
ADD arduino_iot_cloud-0.0.2-py3-none-any.whl /tmp/
RUN pip3 install /tmp/arduino_iot_cloud-0.0.2-py3-none-any.whl

Expand All @@ -140,7 +164,6 @@ RUN mkdir -p /etc/dropbear
# Copy motd welcome message
COPY ./motd /etc/motd
RUN chmod 644 /etc/motd

COPY ./ca-root.pem /etc/ssl/certs/ca-cert-Arduino.pem
RUN chmod -R 644 /etc/ssl/certs/ca-cert-Arduino.pem

Expand All @@ -156,4 +179,5 @@ COPY ./portenta_hat_carrier.txt /root/examples/tenta-config
# Entrypoint
COPY ./entrypoint.sh /
RUN chmod 700 /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
5 changes: 5 additions & 0 deletions arduino-ootb-python-devel/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Arduino out of the box python development

Python development image for arduino out of the box application


Loading