mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-09-04 17:23:21 +00:00
feat(release): reduce image size by running autoremove, clean and removing lists (#6267)
This commit is contained in:
+8
-3
@@ -70,7 +70,10 @@ RUN apt update \
|
||||
&& chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
|
||||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
|
||||
&& apt update \
|
||||
&& apt --yes --no-install-recommends install git
|
||||
&& apt --yes --no-install-recommends install git \
|
||||
&& apt autoremove -y --purge \
|
||||
&& apt clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
## Empty the directory, because we have to clone the Git repo.
|
||||
RUN rm -rf ./* && chown node /app
|
||||
@@ -95,7 +98,10 @@ CMD ["npm", "run", "start-pr-test"]
|
||||
FROM louislam/uptime-kuma:base2 AS upload-artifact
|
||||
WORKDIR /
|
||||
RUN apt update && \
|
||||
apt --yes install curl file
|
||||
apt --yes install curl file && \
|
||||
apt autoremove -y --purge && \
|
||||
apt clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=build /app /app
|
||||
|
||||
@@ -115,4 +121,3 @@ RUN chmod +x /app/extra/upload-github-release-asset.sh
|
||||
# Dist only
|
||||
RUN cd /app && tar -zcvf $DIST dist
|
||||
RUN /app/extra/upload-github-release-asset.sh github_api_token=$GITHUB_TOKEN owner=louislam repo=uptime-kuma tag=$VERSION filename=/app/$DIST
|
||||
|
||||
|
||||
Reference in New Issue
Block a user