File tree Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 11FROM golang:1.24.2 AS go
22
3- ARG BINARY_NAME="arduino-app-cli"
3+ ARG BINARY_NAME
4+ RUN test -n "${BINARY_NAME}" || (echo "Error: BINARY_NAME is not set" && exit 1)
45
56COPY . /app
67WORKDIR /app
7- RUN GOOS=linux go build -o ${BINARY_NAME} ./cmd/arduino-app-cli/
8+ RUN GOOS=linux go build -o ${BINARY_NAME} ./cmd/${BINARY_NAME}
89
910FROM debian:bookworm AS debian
1011
1112ARG VERSION="1.0.0"
1213ARG REVISION="1"
14+ ARG DEB_NAME
15+ RUN test -n "${DEB_NAME}" || (echo "Error: DEB_NAME is not set" && exit 1)
16+ ARG BINARY_NAME
17+ RUN test -n "${BINARY_NAME}" || (echo "Error: BINARY_NAME is not set" && exit 1)
1318
1419RUN apt-get update && apt-get install -y sed
1520
16- COPY ./debian/orchestrator /orchestrator /
17- COPY --from=go /app/${BINARY_NAME} /orchestrator /usr/bin/${BINARY_NAME}
21+ COPY ./debian/${DEB_NAME} /${DEB_NAME} /
22+ COPY --from=go /app/${BINARY_NAME} /${DEB_NAME} /usr/bin/${BINARY_NAME}
1823
19- RUN sed -i "s/ARCH/$(dpkg --print-architecture)/" /orchestrator /DEBIAN/control && \
20- dpkg-deb --build --root-owner-group /orchestrator &&\
21- mv /orchestrator .deb "/orchestrator_ ${VERSION}-${REVISION}_$(dpkg --print-architecture).deb"
24+ RUN sed -i "s/ARCH/$(dpkg --print-architecture)/" /${DEB_NAME} /DEBIAN/control && \
25+ dpkg-deb --build --root-owner-group /${DEB_NAME} &&\
26+ mv /${DEB_NAME} .deb "/${DEB_NAME}_ ${VERSION}-${REVISION}_$(dpkg --print-architecture).deb"
2227
2328FROM scratch
2429
Original file line number Diff line number Diff line change @@ -3,4 +3,5 @@ Version: 1.0
33Architecture: ARCH
44Maintainer: arduino <support@arduino.cc>
55Description: Arduino application orchestrator
6- Depends: docker.io, docker-compose
6+ Depends:
7+
Original file line number Diff line number Diff line change 22Description =Arduino Orchestrator Service
33
44[Service]
5- ExecStart =/usr/bin/orchestrator
5+ ExecStart =/usr/bin/arduino-app-cli daemon --port 8800
6+ Environment ="ARDUINO_APP_CLI__APPS_DIR=/opt/arduino/apps"
7+ Environment ="ARDUINO_APP_CLI__DATA_DIR=/opt/arduino/data"
68StandardOutput =journal
79StandardError =journal
810Restart =always
You can’t perform that action at this time.
0 commit comments