Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/build_python_mqtt_dev_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
if: env.DOCKERHUB_ORGANIZATION == null
with:
context: .
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
Expand All @@ -65,7 +65,7 @@ jobs:
if: env.DOCKERHUB_ORGANIZATION != null
with:
context: .
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_python_mqtt_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
if: env.DOCKERHUB_ORGANIZATION == null
with:
context: .
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
ghcr.io/${{ steps.lowercase-repository.outputs.lowercase }}/saic-mqtt-gateway:latest
Expand All @@ -63,7 +63,7 @@ jobs:
if: env.DOCKERHUB_ORGANIZATION != null
with:
context: .
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
ghcr.io/${{ steps.lowercase-repository.outputs.lowercase }}/saic-mqtt-gateway:latest
Expand Down
26 changes: 3 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,7 @@
ARG POETRY_VERSION=2.1.2
ARG POETRY_VERSION=2.1.3
ARG PYTHON_VERSION=3.12

FROM weastur/poetry:${POETRY_VERSION}-python-${PYTHON_VERSION} AS builder

ENV POETRY_HOME=/opt/poetry
ENV POETRY_NO_INTERACTION=1
ENV POETRY_VIRTUALENVS_IN_PROJECT=1
ENV POETRY_VIRTUALENVS_CREATE=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Tell Poetry where to place its cache and virtual environment
ENV POETRY_CACHE_DIR=/opt/.cache

# Install build-time deps for poetry and FFI
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
g++ \
gcc \
libffi-dev \
libssl-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
FROM nanomad/poetry:${POETRY_VERSION}-python-${PYTHON_VERSION} AS builder

WORKDIR /usr/src/app

Expand All @@ -32,7 +12,7 @@ COPY pyproject.toml poetry.lock /usr/src/app/

# Install the dependencies and clear the cache afterwards.
# This may save some MBs.
RUN --mount=type=tmpfs,target=/root/.cargo poetry install --no-root && rm -rf $POETRY_CACHE_DIR
RUN poetry install --no-root && rm -rf $POETRY_CACHE_DIR

# Now let's build the runtime image from the builder.
# We'll just copy the env and the PATH reference.
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
services:
saic-mqtt-gateway:
image: "saicismartapi/saic-python-mqtt-gateway:latest"
build:
context: .
container_name: "saic-mqtt-gateway"
environment:
- MQTT_URI=${MQTT_BROKER_URI}
Expand Down
Loading