Skip to content

Commit

Permalink
build from debian slim
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseklm committed Aug 3, 2024
1 parent dcf804b commit c138952
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with:
context: .
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
FROM pypy:3.10-slim
FROM debian:12-slim

WORKDIR /usr/src/app

COPY . .

RUN apt-get -y update && apt-get install -y build-essential git && \
SHELL ["/bin/bash", "-c"]

RUN apt-get -y update && apt-get install -y build-essential git pypy3 pypy3-venv && \
pypy3 -m venv venv && \
source venv/bin/activate && \
pip install --no-cache-dir --prefer-binary -r requirements.txt && \
apt-get remove -y build-essential git && \
apt-get autoremove -y && \
apt-get clean && rm -rf /var/lib/apt/lists/*

CMD [ "pypy", "./sungrowmodbus2mqtt.py" ]
CMD [ "venv/bin/pypy3", "./sungrowmodbus2mqtt.py" ]

0 comments on commit c138952

Please sign in to comment.