mirror of
https://github.com/thegeeklab/prometheus-pve-sd.git
synced 2024-06-02 07:59:40 +02:00
chore: move from alpine to slim base image
This commit is contained in:
parent
19b3755c77
commit
c91d19793b
|
@ -136,7 +136,7 @@ local PipelineBuildPackage = {
|
|||
},
|
||||
{
|
||||
name: 'checksum',
|
||||
image: 'alpine',
|
||||
image: 'thegeeklab/alpine-tools',
|
||||
commands: [
|
||||
'cd dist/ && sha256sum * > ../sha256sum.txt',
|
||||
],
|
||||
|
@ -197,35 +197,24 @@ local PipelineBuildPackage = {
|
|||
};
|
||||
|
||||
local PipelineBuildContainer(arch='amd64') = {
|
||||
local build = if arch == 'arm' then [{
|
||||
name: 'build',
|
||||
image: 'python:3.10-alpine',
|
||||
commands: [
|
||||
'apk add -Uq --no-cache build-base openssl-dev libffi-dev musl-dev python3-dev git cargo',
|
||||
'git fetch -tq',
|
||||
'pip install poetry poetry-dynamic-versioning -qq',
|
||||
'poetry build',
|
||||
],
|
||||
environment: {
|
||||
CARGO_NET_GIT_FETCH_WITH_CLI: true,
|
||||
},
|
||||
}] else [{
|
||||
name: 'build',
|
||||
image: 'python:3.10',
|
||||
commands: [
|
||||
'git fetch -tq',
|
||||
'pip install poetry poetry-dynamic-versioning -qq',
|
||||
'poetry build',
|
||||
],
|
||||
}],
|
||||
|
||||
kind: 'pipeline',
|
||||
name: 'build-container-' + arch,
|
||||
platform: {
|
||||
os: 'linux',
|
||||
arch: arch,
|
||||
},
|
||||
steps: build + [
|
||||
steps: [
|
||||
{
|
||||
name: 'build',
|
||||
image: 'python:3.10',
|
||||
commands: [
|
||||
'apt update',
|
||||
'apt install -y --no-install-recommends rustc cargo',
|
||||
'git fetch -tq',
|
||||
'pip install poetry poetry-dynamic-versioning -qq',
|
||||
'poetry build',
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'dryrun',
|
||||
image: 'thegeeklab/drone-docker:19',
|
||||
|
|
15
.drone.yml
15
.drone.yml
|
@ -156,7 +156,7 @@ steps:
|
|||
- poetry build
|
||||
|
||||
- name: checksum
|
||||
image: alpine
|
||||
image: thegeeklab/alpine-tools
|
||||
commands:
|
||||
- cd dist/ && sha256sum * > ../sha256sum.txt
|
||||
|
||||
|
@ -223,6 +223,8 @@ steps:
|
|||
- name: build
|
||||
image: python:3.10
|
||||
commands:
|
||||
- apt update
|
||||
- apt install -y --no-install-recommends rustc cargo
|
||||
- git fetch -tq
|
||||
- pip install poetry poetry-dynamic-versioning -qq
|
||||
- poetry build
|
||||
|
@ -301,6 +303,8 @@ steps:
|
|||
- name: build
|
||||
image: python:3.10
|
||||
commands:
|
||||
- apt update
|
||||
- apt install -y --no-install-recommends rustc cargo
|
||||
- git fetch -tq
|
||||
- pip install poetry poetry-dynamic-versioning -qq
|
||||
- poetry build
|
||||
|
@ -377,14 +381,13 @@ platform:
|
|||
|
||||
steps:
|
||||
- name: build
|
||||
image: python:3.10-alpine
|
||||
image: python:3.10
|
||||
commands:
|
||||
- apk add -Uq --no-cache build-base openssl-dev libffi-dev musl-dev python3-dev git cargo
|
||||
- apt update
|
||||
- apt install -y --no-install-recommends rustc cargo
|
||||
- git fetch -tq
|
||||
- pip install poetry poetry-dynamic-versioning -qq
|
||||
- poetry build
|
||||
environment:
|
||||
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
||||
|
||||
- name: dryrun
|
||||
image: thegeeklab/drone-docker:19
|
||||
|
@ -630,6 +633,6 @@ depends_on:
|
|||
|
||||
---
|
||||
kind: signature
|
||||
hmac: 9ed3991a84fdb078a647e5c0673bab3283417c894ed9b858ee939f32741e350b
|
||||
hmac: 4def00ae9966eae6adee0e2a9564ce0a3fe2d1c60c2f0c944dc673d1311b25f6
|
||||
|
||||
...
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM python:3.10-alpine@sha256:dce56d40d885d2c8847aa2a278a29d50450c8e3d10f9d7ffeb2f38dcc1eb0ea4
|
||||
FROM amd64/python:3.10-slim
|
||||
|
||||
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
||||
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
||||
|
@ -11,11 +11,12 @@ ENV PY_COLORS=1
|
|||
|
||||
ADD dist/prometheus_pve_sd-*.whl /
|
||||
|
||||
RUN apk update && \
|
||||
RUN apt update && \
|
||||
pip install --upgrade --no-cache-dir pip && \
|
||||
pip install --no-cache-dir $(find / -name "prometheus_pve_sd-*.whl") && \
|
||||
rm -f prometheus_pve_sd-*.whl && \
|
||||
rm -rf /var/cache/apk/* && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/* && \
|
||||
rm -rf /root/.cache/
|
||||
|
||||
USER root
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM arm32v7/python:3.10-alpine@sha256:12675b471e7e8cff36cf9124b72bc99e8b56c326fb0a53dabac537532e634e1f
|
||||
FROM arm32v7/python:3.10-slim
|
||||
|
||||
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
||||
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
||||
|
@ -11,11 +11,12 @@ ENV PY_COLORS=1
|
|||
|
||||
ADD dist/prometheus_pve_sd-*.whl /
|
||||
|
||||
RUN apk update && \
|
||||
RUN apt update && \
|
||||
pip install --upgrade --no-cache-dir pip && \
|
||||
pip install --no-cache-dir $(find / -name "prometheus_pve_sd-*.whl") && \
|
||||
rm -f prometheus_pve_sd-*.whl && \
|
||||
rm -rf /var/cache/apk/* && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/* && \
|
||||
rm -rf /root/.cache/
|
||||
|
||||
USER root
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM arm64v8/python:3.10-alpine@sha256:696a82b99de314cb5407a6ca3029df2514e4ecd09f63f115e8fb6988edc2914d
|
||||
FROM arm64v8/python:3.10-slim
|
||||
|
||||
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
||||
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
||||
|
@ -11,11 +11,12 @@ ENV PY_COLORS=1
|
|||
|
||||
ADD dist/prometheus_pve_sd-*.whl /
|
||||
|
||||
RUN apk update && \
|
||||
RUN apt update && \
|
||||
pip install --upgrade --no-cache-dir pip && \
|
||||
pip install --no-cache-dir $(find / -name "prometheus_pve_sd-*.whl") && \
|
||||
rm -f prometheus_pve_sd-*.whl && \
|
||||
rm -rf /var/cache/apk/* && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /tmp/* && \
|
||||
rm -rf /root/.cache/
|
||||
|
||||
USER root
|
||||
|
|
Loading…
Reference in New Issue
Block a user