Skip to content

Commit

Permalink
Chocolatey 1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed May 3, 2023
1 parent 94ca053 commit 3fa54fe
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# syntax=docker/dockerfile:1

ARG CHOCOLATEY_VERSION="1.1.0"
ARG CHOCOLATEY_VERSION="1.3.1"
ARG MONO_VERSION="6.12"
ARG ALPINE_VERSION="3.16"
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
RUN apt-get update \
&& apt-get install -y \
gzip \
tar \
wget \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ARG DEBIAN_FRONTEND=noninteractive

ENV ChocolateyInstall="/opt/chocolatey"
ARG CHOCOLATEY_VERSION
WORKDIR /usr/local/src
RUN wget "https://github.com/chocolatey/choco/archive/${CHOCOLATEY_VERSION}.tar.gz" \
&& tar -xzf "${CHOCOLATEY_VERSION}.tar.gz" \
&& mv choco-${CHOCOLATEY_VERSION} choco
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 chmod +x build.sh zip.sh
RUN ./build.sh
RUN ./build.sh --verbosity=diagnostic

FROM alpine:${ALPINE_VERSION}
LABEL maintainer="CrazyMax"

COPY --from=builder /usr/local/src/choco/build_output/chocolatey /opt/chocolatey

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 \
&& 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/*

COPY entrypoint.sh /
ENTRYPOINT [ "/entrypoint.sh" ]

0 comments on commit 3fa54fe

Please sign in to comment.