mirror of
https://github.com/harness-community/drone-helm-chart-container-registry.git
synced 2026-06-04 18:24:12 +08:00
Multi-arch Dcokerfiles, tests added
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
FROM --platform=linux/amd64 alpine:3.18 as base
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV HELM_EXPERIMENTAL_OCI=1
|
||||
|
||||
RUN apk --no-cache add ca-certificates curl && \
|
||||
curl -LO "https://get.helm.sh/helm-v3.7.0-linux-amd64.tar.gz" && \
|
||||
tar -zxvf helm-v3.7.0-linux-amd64.tar.gz && \
|
||||
mv linux-amd64/helm /usr/local/bin/helm && \
|
||||
rm -rf linux-amd64 helm-v3.7.0-linux-amd64.tar.gz && \
|
||||
chmod +x /usr/local/bin/helm
|
||||
|
||||
RUN apk --no-cache add python3
|
||||
|
||||
COPY ../main.py /app/
|
||||
|
||||
CMD ["python3", "/app/main.py"]
|
||||
@@ -0,0 +1,19 @@
|
||||
# Dockerfile for linux/arm64
|
||||
FROM --platform=linux/arm64 alpine:3.18 as base
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV HELM_EXPERIMENTAL_OCI=1
|
||||
|
||||
RUN apk --no-cache add ca-certificates curl && \
|
||||
curl -LO "https://get.helm.sh/helm-v3.7.0-linux-arm64.tar.gz" && \
|
||||
tar -zxvf helm-v3.7.0-linux-arm64.tar.gz && \
|
||||
mv linux-arm64/helm /usr/local/bin/helm && \
|
||||
rm -rf linux-arm64 helm-v3.7.0-linux-arm64.tar.gz && \
|
||||
chmod +x /usr/local/bin/helm
|
||||
|
||||
RUN apk --no-cache add python3
|
||||
|
||||
COPY main.py /app/
|
||||
|
||||
CMD ["python3", "/app/main.py"]
|
||||
@@ -0,0 +1,22 @@
|
||||
# Use Windows Server Core as base
|
||||
FROM --platform=windows/amd64 mcr.microsoft.com/windows/servercore:ltsc2022 as base
|
||||
|
||||
FROM --platform=windows/amd64 mcr.microsoft.com/windows/nanoserver:1809
|
||||
USER ContainerAdministrator
|
||||
|
||||
WORKDIR C:\app
|
||||
|
||||
ENV HELM_EXPERIMENTAL_OCI=1
|
||||
|
||||
COPY --from=core /windows/system32/netapi32.dll /windows/system32/netapi32.dll
|
||||
|
||||
RUN curl.exe -LO "https://get.helm.sh/helm-v3.7.0-windows-amd64.zip" && \
|
||||
Expand-Archive -Path helm-v3.7.0-windows-amd64.zip -DestinationPath . && \
|
||||
Move-Item -Path .\windows-amd64\helm.exe -Destination C:\Windows\System32\helm.exe && \
|
||||
Remove-Item -Path helm-v3.7.0-windows-amd64.zip, windows-amd64 -Recurse
|
||||
|
||||
RUN powershell -Command Install-WindowsFeature Web-Server
|
||||
|
||||
COPY ./main.py ./
|
||||
|
||||
CMD ["python", "C:\\app\\main.py"]
|
||||
@@ -0,0 +1,17 @@
|
||||
# Dockerfile for windows/arm64
|
||||
FROM --platform=${BUILDPLATFORM:-windows/arm64} mcr.microsoft.com/windows/nanoserver:1809
|
||||
|
||||
WORKDIR C:\app
|
||||
|
||||
ENV HELM_EXPERIMENTAL_OCI=1
|
||||
|
||||
RUN curl.exe -LO "https://get.helm.sh/helm-v3.7.0-windows-arm64.zip" && \
|
||||
Expand-Archive -Path helm-v3.7.0-windows-arm64.zip -DestinationPath . && \
|
||||
Move-Item -Path .\windows-arm64\helm.exe -Destination C:\Windows\System32\helm.exe && \
|
||||
Remove-Item -Path helm-v3.7.0-windows-arm64.zip, windows-arm64 -Recurse
|
||||
|
||||
RUN powershell -Command Install-WindowsFeature Web-Server
|
||||
|
||||
COPY main.py ./
|
||||
|
||||
CMD ["python", "C:\\app\\main.py"]
|
||||
Reference in New Issue
Block a user