-
-
Notifications
You must be signed in to change notification settings - Fork 8
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 #166 from crazy-max/update
image: update to v2.2.2
- Loading branch information
Showing
1 changed file
with
9 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,21 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
ARG CHOCOLATEY_VERSION="1.3.1" | ||
ARG MONO_VERSION="6.12" | ||
ARG CHOCOLATEY_VERSION="2.2.2" | ||
ARG ALPINE_VERSION="3.17" | ||
|
||
FROM --platform=$BUILDPLATFORM alpine:${ALPINE_VERSION} as src | ||
RUN apk add --no-cache git | ||
WORKDIR /src | ||
ARG CHOCOLATEY_VERSION | ||
RUN git clone --branch ${CHOCOLATEY_VERSION} "https://github.com/chocolatey/choco.git" . | ||
|
||
FROM mono:${MONO_VERSION} as builder | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN curl -o packages-microsoft-prod.deb https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb \ | ||
&& dpkg -i packages-microsoft-prod.deb \ | ||
&& apt-get update \ | ||
&& apt-get install -y dotnet-sdk-6.0 | ||
|
||
RUN echo deb http://deb.debian.org/debian buster-backports main | tee /etc/apt/sources.list.d/buster-backports.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y -t buster-backports git | ||
|
||
ENV ChocolateyInstall="/opt/chocolatey" | ||
COPY --from=src /src /usr/local/src/choco | ||
WORKDIR /usr/local/src/choco | ||
RUN ./build.sh --verbosity=diagnostic | ||
|
||
FROM alpine:${ALPINE_VERSION} | ||
COPY --from=builder /usr/local/src/choco/code_drop/temp/_PublishedApps/choco /opt/chocolatey | ||
RUN apk --update --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing add mono-dev \ | ||
&& apk --update --no-cache add -t build-dependencies ca-certificates \ | ||
WORKDIR /opt/chocolatey | ||
RUN apk --update --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing add mono-dev \ | ||
&& apk add --no-cache curl \ | ||
&& apk add -t build-dependencies ca-certificates \ | ||
&& cert-sync /etc/ssl/certs/ca-certificates.crt \ | ||
&& ln -sf /opt /opt/chocolatey/opt \ | ||
&& mkdir -p /opt/chocolatey/lib \ | ||
&& apk del build-dependencies \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
ARG CHOCOLATEY_VERSION | ||
RUN curl -sSL "https://github.com/chocolatey/choco/releases/download/${CHOCOLATEY_VERSION}/chocolatey.v${CHOCOLATEY_VERSION}.tar.gz" | tar xz | ||
|
||
COPY entrypoint.sh / | ||
ENTRYPOINT [ "/entrypoint.sh" ] |