Skip to content

Commit

Permalink
Merge pull request #166 from crazy-max/update
Browse files Browse the repository at this point in the history
image: update to v2.2.2
  • Loading branch information
crazy-max authored Aug 31, 2023
2 parents 525d2fb + 6c3efe2 commit 12b3da1
Showing 1 changed file with 9 additions and 28 deletions.
37 changes: 9 additions & 28 deletions image/Dockerfile
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" ]

0 comments on commit 12b3da1

Please sign in to comment.