|
1 | | -# choco supports only Mono 5.20.x |
2 | | -# https://github.com/chocolatey/choco#prerequisites |
3 | | -FROM mono:5.20 as builder |
4 | | -# 0.10.15 with newer Mono is failing as it's dependent on Mono Profile 4.0 which has been deprecated |
5 | | -# http://www.mono-project.com/docs/about-mono/releases/4.0.0/#dropped-support-for-old-frameworks |
6 | | -# Alternative to consider, use git repository and reset to specific tag/hash |
7 | | -ARG CHOCOVERSION=0.10.16-beta |
8 | | - |
9 | | -ENV DEBIAN_FRONTEND=noninteractive |
10 | | -RUN apt-get update && apt-get install -y wget tar gzip |
11 | | - |
12 | | -WORKDIR /usr/local/src |
13 | | -RUN wget "https://github.com/chocolatey/choco/archive/${CHOCOVERSION}.tar.gz" |
14 | | -RUN tar -xzf "${CHOCOVERSION}.tar.gz" |
15 | | -RUN mv "choco-${CHOCOVERSION}" choco |
16 | | - |
17 | | -WORKDIR /usr/local/src/choco |
18 | | -RUN chmod +x build.sh zip.sh |
19 | | -RUN ./build.sh -v |
20 | | - |
21 | 1 | FROM alpine:latest |
22 | 2 |
|
23 | | -COPY --from=builder /usr/local/src/choco/build_output/chocolatey /opt/chocolatey |
| 3 | +ARG CHOCOVERSION=0.11.3 |
24 | 4 |
|
25 | | -RUN apk add --no-cache bash |
26 | | -RUN apk --update --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing add mono-dev \ |
27 | | - && apk --update --no-cache add -t build-dependencies ca-certificates \ |
| 5 | +RUN apk add --no-cache bash ca-certificates \ |
| 6 | + && apk --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing add mono-dev \ |
28 | 7 | && cert-sync /etc/ssl/certs/ca-certificates.crt \ |
| 8 | + && wget "https://github.com/chocolatey/choco/archive/${CHOCOVERSION}.tar.gz" \ |
| 9 | + && tar -xzf "${CHOCOVERSION}.tar.gz" \ |
| 10 | + && mv "choco-${CHOCOVERSION}" /opt/chocolatey \ |
| 11 | + && chmod +x build.sh zip.sh \ |
| 12 | + && ./build.sh -v \ |
29 | 13 | && ln -sf /opt /opt/chocolatey/opt \ |
30 | 14 | && mkdir -p /opt/chocolatey/lib \ |
31 | | - && apk del build-dependencies \ |
| 15 | + && apk del ca-certificates \ |
32 | 16 | && rm -rf /var/cache/apk/* |
33 | 17 |
|
34 | | - |
35 | 18 | COPY entrypoint.sh /entrypoint.sh |
36 | 19 | ENTRYPOINT ["/entrypoint.sh"] |
0 commit comments