-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from unixorn/update-dockerfile
Docker build cleanups
- Loading branch information
Showing
3 changed files
with
9 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,12 @@ | ||
FROM python:3.10 | ||
FROM python:slim | ||
|
||
ARG application_version | ||
LABEL maintainer="Joe Block <[email protected]>" | ||
LABEL description="ha-mqtt-discoverable utility image" | ||
LABEL version=${application_version} | ||
|
||
RUN apt-get update && \ | ||
apt-get install --no-install-recommends -y apt-utils=2.2.4 ca-certificates=20210119 && \ | ||
update-ca-certificates && \ | ||
rm -fr /tmp/* /var/lib/apt/lists/* | ||
|
||
# Copy wheel file built by Poetry | ||
COPY dist/*.whl /app/ | ||
|
||
RUN python -m pip install --upgrade pip --no-cache-dir && \ | ||
pip install --no-cache-dir /app/*.whl && \ | ||
pip cache purge && \ | ||
rm -rf /app/*.whl | ||
RUN python -m pip install ha-mqtt-discoverable && \ | ||
pip cache purge | ||
|
||
USER nobody | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters