Skip to content

Commit

Permalink
fix: use internal docker images (#1769)
Browse files Browse the repository at this point in the history
* fix images for UniversalDecoder

* fix CI: login to ACT first

* don't use dummy env for building

* use ARG to set registry, overwrite on bake
  • Loading branch information
roel4ez authored Jul 4, 2022
1 parent f5f6e40 commit 81a6af1
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ env:
AZURE_FUNCTIONAPP_NAME: loramoduleintegrationtest
TESTS_FOLDER: Tests
TESTS_RESULTS_FOLDER: Tests/TestResults
CONTAINER_REGISTRY_ADDRESS: "${{ secrets.CI_ACR_NAME }}.azurecr.io"
CONTAINER_REGISTRY_USERNAME: "${{ secrets.CI_ACR_NAME }}"
CONTAINER_REGISTRY_PASSWORD: ${{ secrets.CI_ACR_CREDENTIALS }}

jobs:
build_and_test:
Expand Down Expand Up @@ -109,7 +112,6 @@ jobs:

- name: Build docker images
run: |
docker buildx bake
echo ${{ env.CONTAINER_REGISTRY_PASSWORD }} | docker login "${{ env.CONTAINER_REGISTRY_ADDRESS }}" --username "${{ env.CONTAINER_REGISTRY_USERNAME }}" --password-stdin
docker buildx bake --set *.args.SOURCE_CONTAINER_REGISTRY_ADDRESS=${{ env.CONTAINER_REGISTRY_ADDRESS }}
working-directory: LoRaEngine
env:
CONTAINER_REGISTRY_ADDRESS: docker.io/test
5 changes: 3 additions & 2 deletions LoRaEngine/modules/LoRaBasicsStationModule/Dockerfile.amd64
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#This docker builds a container for the LoRa Basics station on amd64 architecture

FROM amd64/debian:buster as build
ARG SOURCE_CONTAINER_REGISTRY_ADDRESS=docker.io
FROM $SOURCE_CONTAINER_REGISTRY_ADDRESS/amd64/debian:buster as build
RUN apt-get update
RUN apt-get install -y git
RUN apt-get install -y --no-install-recommends apt-utils build-essential
Expand All @@ -9,7 +10,7 @@ WORKDIR /basicstation

RUN make platform=linux variant=std

FROM amd64/debian:buster-slim
FROM $SOURCE_CONTAINER_REGISTRY_ADDRESS/amd64/debian:buster-slim
WORKDIR /basicstation
COPY --from=build /basicstation/build-linux-std/bin/station ./station.std
COPY LoRaEngine/modules/LoRaBasicsStationModule/helper-functions.sh .
Expand Down
5 changes: 3 additions & 2 deletions LoRaEngine/modules/LoRaBasicsStationModule/Dockerfile.arm32v7
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#This docker builds a container for the LoRa Basics station on arm32 architecture

FROM amd64/debian:buster as build
ARG SOURCE_CONTAINER_REGISTRY_ADDRESS=docker.io
FROM $SOURCE_CONTAINER_REGISTRY_ADDRESS/amd64/debian:buster as build
RUN apt-get update \
&& apt-get install -y git apt-utils build-essential gcc-arm-linux-gnueabihf
RUN git clone --branch v2.0.6 --single-branch --depth 1 https://github.com/lorabasics/basicstation.git
Expand Down Expand Up @@ -30,7 +31,7 @@ RUN sed -i "s|8000000|2000000|g" /basicstation/deps/lgw/platform-rpi/libloragw/s
RUN make platform=rpi variant=std
RUN cp ./build-rpi-std/bin/station ./built/station.spispeed2

FROM arm32v7/debian:buster
FROM $SOURCE_CONTAINER_REGISTRY_ADDRESS/arm32v7/debian:buster
WORKDIR /basicstation
COPY --from=build /basicstation/deps/lgw/platform-rpi/reset_lgw.sh .
COPY --from=build /basicstation/built/* .
Expand Down
3 changes: 2 additions & 1 deletion Samples/UniversalDecoder/Dockerfile.amd64
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM node:14-alpine
ARG SOURCE_CONTAINER_REGISTRY_ADDRESS=docker.io
FROM $SOURCE_CONTAINER_REGISTRY_ADDRESS/amd64/node:14-alpine

WORKDIR /app/

Expand Down
3 changes: 2 additions & 1 deletion Samples/UniversalDecoder/Dockerfile.arm32v7
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM arm32v7/node:14-slim
ARG SOURCE_CONTAINER_REGISTRY_ADDRESS=docker.io
FROM $SOURCE_CONTAINER_REGISTRY_ADDRESS/arm32v7/node:14-slim

WORKDIR /app/

Expand Down
3 changes: 2 additions & 1 deletion Samples/UniversalDecoder/Dockerfile.arm64v8
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM arm64v8/node:14-slim
ARG SOURCE_CONTAINER_REGISTRY_ADDRESS=docker.io
FROM $SOURCE_CONTAINER_REGISTRY_ADDRESS/arm64v8/node:14-slim

WORKDIR /app/

Expand Down

0 comments on commit 81a6af1

Please sign in to comment.