Commit 13393cae authored by Eric Timmons's avatar Eric Timmons
Browse files

Templatize Dockerfiles

parent 5f9d97ca
Pipeline #2141 passed with stage
in 30 seconds
include: include:
- project: 'cl-docker-images/ci-helpers' - project: 'cl-docker-images/ci-helpers'
file: '/cl-docker-images-default-pipeline.yml' file: '/cl-docker-images-default-pipeline-v2.yml'
variables: variables:
CANONICAL_NAMESPACE: daewok
CL_DOCKER_IMAGES_AMD64: "1" CL_DOCKER_IMAGES_AMD64: "1"
CL_DOCKER_IMAGES_ARM32V7: "1" CL_DOCKER_IMAGES_ARM32V7: "1"
CL_DOCKER_IMAGES_WINAMD64: "1" CL_DOCKER_IMAGES_WINAMD64: "1"
WINDOWS_PARENT_IMAGES: "mcr.microsoft.com/windows/servercore:ltsc2016;mcr.microsoft.com/windows/servercore:1809"
##############################################################################
# Put shared
put-shared clfoundation:
extends: Bashbrew put-shared
variables:
BASHBREW_NAMESPACE: clfoundation
##############################################################################
# Readme
Pushrm clfoundation:
extends: Pushrm
variables:
README_NAMESPACE: clfoundation
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
FROM buildpack-deps:buster
ENV CCL_VERSION 1.12
WORKDIR /usr/local/src/
# hadolint ignore=DL3003,DL3008
RUN set -x \
&& case "$(dpkg --print-architecture)" in \
armhf) PLATFORM=linuxarm; CCL_SCRIPT=ccl;; \
amd64) PLATFORM=linuxx86; CCL_SCRIPT=ccl64;; \
*) echo "Unknown arch" >&2; exit 1;; \
esac \
&& export PLATFORM \
&& export CCL_SCRIPT \
&& curl -fsSL https://github.com/Clozure/ccl/archive/v${CCL_VERSION}.tar.gz > v${CCL_VERSION}.tar.gz \
&& curl -fsSL https://github.com/Clozure/ccl/releases/download/v${CCL_VERSION}/${PLATFORM}.tar.gz > ${PLATFORM}.tar.gz \
&& gunzip ${PLATFORM}.tar.gz \
&& gunzip v${CCL_VERSION}.tar.gz \
&& tar xf v${CCL_VERSION}.tar \
&& mv ccl-${CCL_VERSION} ccl \
&& ( cd ccl && tar xf ../${PLATFORM}.tar && cp scripts/$CCL_SCRIPT /usr/local/bin/ccl && ccl -b -e "(rebuild-ccl :full t)" ) \
&& rm -rf v${CCL_VERSION}.tar ${PLATFORM}.tar \
&& ccl --version
WORKDIR /
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["ccl"]
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
FROM debian:buster FROM debian:buster
LABEL maintainer="etimmons@mit.edu" ENV CCL_VERSION 1.12
ENV CCL_VERSION=1.12
ARG PLATFORM=linuxarm
ARG CCL_SCRIPT=ccl
WORKDIR /usr/local/src/ WORKDIR /usr/local/src/
# hadolint ignore=DL3003,DL3008 # hadolint ignore=DL3003,DL3008
RUN set -x \ RUN set -x \
&& case "$(dpkg --print-architecture)" in \
armhf) PLATFORM=linuxarm; CCL_SCRIPT=ccl;; \
amd64) PLATFORM=linuxx86; CCL_SCRIPT=ccl64;; \
*) echo "Unknown arch" >&2; exit 1;; \
esac \
&& export PLATFORM \
&& export CCL_SCRIPT \
&& apt-get update \ && apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates build-essential m4 make \ && apt-get install -y --no-install-recommends curl ca-certificates build-essential m4 make \
&& curl -L https://github.com/Clozure/ccl/archive/v${CCL_VERSION}.tar.gz > v${CCL_VERSION}.tar.gz \ && curl -fsSL https://github.com/Clozure/ccl/archive/v${CCL_VERSION}.tar.gz > v${CCL_VERSION}.tar.gz \
&& curl -L https://github.com/Clozure/ccl/releases/download/v${CCL_VERSION}/${PLATFORM}.tar.gz > ${PLATFORM}.tar.gz \ && curl -fsSL https://github.com/Clozure/ccl/releases/download/v${CCL_VERSION}/${PLATFORM}.tar.gz > ${PLATFORM}.tar.gz \
&& gunzip ${PLATFORM}.tar.gz \ && gunzip ${PLATFORM}.tar.gz \
&& gunzip v${CCL_VERSION}.tar.gz \ && gunzip v${CCL_VERSION}.tar.gz \
&& tar xf v${CCL_VERSION}.tar \ && tar xf v${CCL_VERSION}.tar \
...@@ -22,12 +30,13 @@ RUN set -x \ ...@@ -22,12 +30,13 @@ RUN set -x \
&& rm -rf v${CCL_VERSION}.tar ${PLATFORM}.tar \ && rm -rf v${CCL_VERSION}.tar ${PLATFORM}.tar \
&& apt-get remove -y curl ca-certificates build-essential m4 make \ && apt-get remove -y curl ca-certificates build-essential m4 make \
&& apt-get autoremove -y \ && apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/* \
&& ccl --version
WORKDIR / WORKDIR /
COPY docker-entrypoint /usr/local/bin/docker-entrypoint COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint"] ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["ccl"] CMD ["ccl"]
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
FROM buildpack-deps:stretch
ENV CCL_VERSION 1.12
WORKDIR /usr/local/src/
# hadolint ignore=DL3003,DL3008
RUN set -x \
&& case "$(dpkg --print-architecture)" in \
armhf) PLATFORM=linuxarm; CCL_SCRIPT=ccl;; \
amd64) PLATFORM=linuxx86; CCL_SCRIPT=ccl64;; \
*) echo "Unknown arch" >&2; exit 1;; \
esac \
&& export PLATFORM \
&& export CCL_SCRIPT \
&& curl -fsSL https://github.com/Clozure/ccl/archive/v${CCL_VERSION}.tar.gz > v${CCL_VERSION}.tar.gz \
&& curl -fsSL https://github.com/Clozure/ccl/releases/download/v${CCL_VERSION}/${PLATFORM}.tar.gz > ${PLATFORM}.tar.gz \
&& gunzip ${PLATFORM}.tar.gz \
&& gunzip v${CCL_VERSION}.tar.gz \
&& tar xf v${CCL_VERSION}.tar \
&& mv ccl-${CCL_VERSION} ccl \
&& ( cd ccl && tar xf ../${PLATFORM}.tar && cp scripts/$CCL_SCRIPT /usr/local/bin/ccl && ccl -b -e "(rebuild-ccl :full t)" ) \
&& rm -rf v${CCL_VERSION}.tar ${PLATFORM}.tar \
&& ccl --version
WORKDIR /
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["ccl"]
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
FROM debian:stretch FROM debian:stretch
LABEL maintainer="etimmons@mit.edu" ENV CCL_VERSION 1.12
ENV CCL_VERSION=1.12
ARG PLATFORM=linuxx86
ARG CCL_SCRIPT=ccl64
WORKDIR /usr/local/src/ WORKDIR /usr/local/src/
# hadolint ignore=DL3003,DL3008 # hadolint ignore=DL3003,DL3008
RUN set -x \ RUN set -x \
&& case "$(dpkg --print-architecture)" in \
armhf) PLATFORM=linuxarm; CCL_SCRIPT=ccl;; \
amd64) PLATFORM=linuxx86; CCL_SCRIPT=ccl64;; \
*) echo "Unknown arch" >&2; exit 1;; \
esac \
&& export PLATFORM \
&& export CCL_SCRIPT \
&& apt-get update \ && apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates build-essential m4 make \ && apt-get install -y --no-install-recommends curl ca-certificates build-essential m4 make \
&& curl -L https://github.com/Clozure/ccl/archive/v${CCL_VERSION}.tar.gz > v${CCL_VERSION}.tar.gz \ && curl -fsSL https://github.com/Clozure/ccl/archive/v${CCL_VERSION}.tar.gz > v${CCL_VERSION}.tar.gz \
&& curl -L https://github.com/Clozure/ccl/releases/download/v${CCL_VERSION}/${PLATFORM}.tar.gz > ${PLATFORM}.tar.gz \ && curl -fsSL https://github.com/Clozure/ccl/releases/download/v${CCL_VERSION}/${PLATFORM}.tar.gz > ${PLATFORM}.tar.gz \
&& gunzip ${PLATFORM}.tar.gz \ && gunzip ${PLATFORM}.tar.gz \
&& gunzip v${CCL_VERSION}.tar.gz \ && gunzip v${CCL_VERSION}.tar.gz \
&& tar xf v${CCL_VERSION}.tar \ && tar xf v${CCL_VERSION}.tar \
...@@ -22,12 +30,13 @@ RUN set -x \ ...@@ -22,12 +30,13 @@ RUN set -x \
&& rm -rf v${CCL_VERSION}.tar ${PLATFORM}.tar \ && rm -rf v${CCL_VERSION}.tar ${PLATFORM}.tar \
&& apt-get remove -y curl ca-certificates build-essential m4 make \ && apt-get remove -y curl ca-certificates build-essential m4 make \
&& apt-get autoremove -y \ && apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/* \
&& ccl --version
WORKDIR / WORKDIR /
COPY docker-entrypoint /usr/local/bin/docker-entrypoint COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint"] ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["ccl"] CMD ["ccl"]
# escape=` #
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
FROM mcr.microsoft.com/windows/servercore:1809 FROM mcr.microsoft.com/windows/servercore:1809
# Switch to powershell and make sure it exits on error # Switch to powershell and make sure it exits on error
...@@ -7,28 +10,28 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] ...@@ -7,28 +10,28 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
ENV CCL_VERSION=1.12 ENV CCL_VERSION=1.12
RUN $srcurl = ('https://github.com/Clozure/ccl/releases/download/v{0}/ccl-{0}-windowsx86.zip' -f $env:CCL_VERSION); ` RUN $srcurl = ('https://github.com/Clozure/ccl/releases/download/v{0}/ccl-{0}-windowsx86.zip' -f $env:CCL_VERSION); \
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; ` [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
Write-Host ('Downloading {0}' -f $srcurl); ` Write-Host ('Downloading {0}' -f $srcurl); \
Invoke-WebRequest -Uri $srcurl -OutFile ccl.zip -UserAgent "NativeHost"; ` Invoke-WebRequest -Uri $srcurl -OutFile ccl.zip -UserAgent "NativeHost"; \
Write-Host 'Done downloading'; ` Write-Host 'Done downloading'; \
$expectedsha256 = 'F1BA6CFF353F6E6E13828F41DC92A723C01766AE38DCFF774905C9E02D59ED04'; ` $expectedsha256 = 'F1BA6CFF353F6E6E13828F41DC92A723C01766AE38DCFF774905C9E02D59ED04'; \
$actualsha256 = (Get-FileHash ccl.zip -Algorithm sha256).Hash; ` $actualsha256 = (Get-FileHash ccl.zip -Algorithm sha256).Hash; \
Write-Host ('Verifying sha256 {0} (expected: {1})' -f $actualsha256, $expectedsha256); ` Write-Host ('Verifying sha256 {0} (expected: {1})' -f $actualsha256, $expectedsha256); \
if ($actualsha256 -ne $expectedsha256) { ` if ($actualsha256 -ne $expectedsha256) { \
Write-Host 'SHA256 check FAILED!'; ` Write-Host 'SHA256 check FAILED!'; \
exit 1; ` exit 1; \
}; ` }; \
Expand-Archive -Force C:\ccl.zip 'C:\Program Files\'; ` Expand-Archive -Force C:\ccl.zip 'C:\Program Files\'; \
rm C:\ccl.zip; ` rm C:\ccl.zip; \
Add-Content -Path 'C:\Program Files\ccl\ccl.cmd' -Value '@echo off'; ` Add-Content -Path 'C:\Program Files\ccl\ccl.cmd' -Value '@echo off'; \
Add-Content -Path 'C:\Program Files\ccl\ccl.cmd' '\"C:\Program Files\ccl\wx86cl64.exe\"'; ` Add-Content -Path 'C:\Program Files\ccl\ccl.cmd' '\"C:\Program Files\ccl\wx86cl64.exe\"'; \
type 'C:\Program Files\ccl\ccl.cmd' type 'C:\Program Files\ccl\ccl.cmd'
RUN $machineKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey('SYSTEM\ControlSet001\Control\Session Manager\Environment\', $true); ` RUN $machineKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey('SYSTEM\ControlSet001\Control\Session Manager\Environment\', $true); \
$machinePath = $machineKey.GetValue('PATH', [string]::Empty, 'DoNotExpandEnvironmentNames').ToString(); ` $machinePath = $machineKey.GetValue('PATH', [string]::Empty, 'DoNotExpandEnvironmentNames').ToString(); \
$newPath = ('C:\Program Files\ccl;{0}' -f $machinePath); ` $newPath = ('C:\Program Files\ccl;{0}' -f $machinePath); \
$machineKey.SetValue('PATH', $newPath, 'ExpandString'); ` $machineKey.SetValue('PATH', $newPath, 'ExpandString'); \
$machineKey.Close(); $machineKey.Close();
CMD ["ccl"] CMD ["ccl"]
# escape=` #
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
FROM mcr.microsoft.com/windows/servercore:ltsc2016 FROM mcr.microsoft.com/windows/servercore:ltsc2016
# Switch to powershell and make sure it exits on error # Switch to powershell and make sure it exits on error
...@@ -7,28 +10,28 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] ...@@ -7,28 +10,28 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
ENV CCL_VERSION=1.12 ENV CCL_VERSION=1.12
RUN $srcurl = ('https://github.com/Clozure/ccl/releases/download/v{0}/ccl-{0}-windowsx86.zip' -f $env:CCL_VERSION); ` RUN $srcurl = ('https://github.com/Clozure/ccl/releases/download/v{0}/ccl-{0}-windowsx86.zip' -f $env:CCL_VERSION); \
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; ` [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
Write-Host ('Downloading {0}' -f $srcurl); ` Write-Host ('Downloading {0}' -f $srcurl); \
Invoke-WebRequest -Uri $srcurl -OutFile ccl.zip -UserAgent "NativeHost"; ` Invoke-WebRequest -Uri $srcurl -OutFile ccl.zip -UserAgent "NativeHost"; \
Write-Host 'Done downloading'; ` Write-Host 'Done downloading'; \
$expectedsha256 = 'F1BA6CFF353F6E6E13828F41DC92A723C01766AE38DCFF774905C9E02D59ED04'; ` $expectedsha256 = 'F1BA6CFF353F6E6E13828F41DC92A723C01766AE38DCFF774905C9E02D59ED04'; \
$actualsha256 = (Get-FileHash ccl.zip -Algorithm sha256).Hash; ` $actualsha256 = (Get-FileHash ccl.zip -Algorithm sha256).Hash; \
Write-Host ('Verifying sha256 {0} (expected: {1})' -f $actualsha256, $expectedsha256); ` Write-Host ('Verifying sha256 {0} (expected: {1})' -f $actualsha256, $expectedsha256); \
if ($actualsha256 -ne $expectedsha256) { ` if ($actualsha256 -ne $expectedsha256) { \
Write-Host 'SHA256 check FAILED!'; ` Write-Host 'SHA256 check FAILED!'; \
exit 1; ` exit 1; \
}; ` }; \
Expand-Archive -Force C:\ccl.zip 'C:\Program Files\'; ` Expand-Archive -Force C:\ccl.zip 'C:\Program Files\'; \
rm C:\ccl.zip; ` rm C:\ccl.zip; \
Add-Content -Path 'C:\Program Files\ccl\ccl.cmd' -Value '@echo off'; ` Add-Content -Path 'C:\Program Files\ccl\ccl.cmd' -Value '@echo off'; \
Add-Content -Path 'C:\Program Files\ccl\ccl.cmd' '\"C:\Program Files\ccl\wx86cl64.exe\"'; ` Add-Content -Path 'C:\Program Files\ccl\ccl.cmd' '\"C:\Program Files\ccl\wx86cl64.exe\"'; \
type 'C:\Program Files\ccl\ccl.cmd' type 'C:\Program Files\ccl\ccl.cmd'
RUN $machineKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey('SYSTEM\ControlSet001\Control\Session Manager\Environment\', $true); ` RUN $machineKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey('SYSTEM\ControlSet001\Control\Session Manager\Environment\', $true); \
$machinePath = $machineKey.GetValue('PATH', [string]::Empty, 'DoNotExpandEnvironmentNames').ToString(); ` $machinePath = $machineKey.GetValue('PATH', [string]::Empty, 'DoNotExpandEnvironmentNames').ToString(); \
$newPath = ('C:\Program Files\ccl;{0}' -f $machinePath); ` $newPath = ('C:\Program Files\ccl;{0}' -f $machinePath); \
$machineKey.SetValue('PATH', $newPath, 'ExpandString'); ` $machineKey.SetValue('PATH', $newPath, 'ExpandString'); \
$machineKey.Close(); $machineKey.Close();
CMD ["ccl"] CMD ["ccl"]
FROM PLACEHOLDER
ENV CCL_COMMIT PLACEHOLDER
WORKDIR /usr/local/src/
# hadolint ignore=DL3003,DL3008
RUN set -x \
&& case "$(dpkg --print-architecture)" in \
armhf) PLATFORM=linuxarm; CCL_SCRIPT=ccl; CCL_RELEASE_VERSION=1.12;; \
amd64) PLATFORM=linuxx86; CCL_SCRIPT=ccl64; CCL_RELEASE_VERSION=1.12;; \
*) echo "Unknown arch" >&2; exit 1;; \
esac \
&& export PLATFORM \
&& export CCL_SCRIPT \
&& export CCL_RELEASE_VERSION \
&& curl -fsSL https://github.com/Clozure/ccl/archive/${CCL_COMMIT}.tar.gz > ccl-${CCL_COMMIT}.tar.gz \
&& curl -fsSL https://github.com/Clozure/ccl/releases/download/v${CCL_RELEASE_VERSION}/${PLATFORM}.tar.gz > ${PLATFORM}.tar.gz \
&& gunzip ${PLATFORM}.tar.gz \
&& gunzip ccl-${CCL_COMMIT}.tar.gz \
&& tar xf ccl-${CCL_COMMIT}.tar \
&& mv ccl-${CCL_COMMIT} ccl \
&& ( cd ccl && tar xf ../${PLATFORM}.tar && cp scripts/$CCL_SCRIPT /usr/local/bin/ccl && ccl -b -e "(rebuild-ccl :full t)" ) \
&& rm -rf ccl-${CCL_COMMIT}.tar ${PLATFORM}.tar \
&& ccl --version
WORKDIR /
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["ccl"]
FROM PLACEHOLDER
ENV CCL_COMMIT PLACEHOLDER
WORKDIR /usr/local/src/
# hadolint ignore=DL3003,DL3008
RUN set -x \
&& case "$(dpkg --print-architecture)" in \
armhf) PLATFORM=linuxarm; CCL_SCRIPT=ccl; CCL_RELEASE_VERSION=1.12;; \
amd64) PLATFORM=linuxx86; CCL_SCRIPT=ccl64; CCL_RELEASE_VERSION=1.12;; \
*) echo "Unknown arch" >&2; exit 1;; \
esac \
&& export PLATFORM \
&& export CCL_SCRIPT \
&& export CCL_RELEASE_VERSION \
&& apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates build-essential m4 make \
&& curl -fsSL https://github.com/Clozure/ccl/archive/${CCL_COMMIT}.tar.gz > ccl-${CCL_COMMIT}.tar.gz \
&& curl -fsSL https://github.com/Clozure/ccl/releases/download/v${CCL_RELEASE_VERSION}/${PLATFORM}.tar.gz > ${PLATFORM}.tar.gz \
&& gunzip ${PLATFORM}.tar.gz \
&& gunzip ccl-${CCL_COMMIT}.tar.gz \
&& tar xf ccl-${CCL_COMMIT}.tar \
&& mv ccl-${CCL_COMMIT} ccl \
&& ( cd ccl && tar xf ../${PLATFORM}.tar && cp scripts/$CCL_SCRIPT /usr/local/bin/ccl && ccl -b -e "(rebuild-ccl :full t)" ) \
&& rm -rf ccl-${CCL_COMMIT}.tar ${PLATFORM}.tar \
&& apt-get remove -y curl ca-certificates build-essential m4 make \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& ccl --version
WORKDIR /
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["ccl"]
FROM debian:buster FROM PLACEHOLDER
LABEL maintainer="etimmons@mit.edu" ENV CCL_VERSION PLACEHOLDER
ENV CCL_VERSION=1.12
ARG PLATFORM=linuxx86
ARG CCL_SCRIPT=ccl64
WORKDIR /usr/local/src/ WORKDIR /usr/local/src/
# hadolint ignore=DL3003,DL3008 # hadolint ignore=DL3003,DL3008
RUN set -x \ RUN set -x \
&& case "$(dpkg --print-architecture)" in \
armhf) PLATFORM=linuxarm; CCL_SCRIPT=ccl;; \
amd64) PLATFORM=linuxx86; CCL_SCRIPT=ccl64;; \
*) echo "Unknown arch" >&2; exit 1;; \
esac \
&& export PLATFORM \
&& export CCL_SCRIPT \
&& apt-get update \ && apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates build-essential m4 make \ && apt-get install -y --no-install-recommends curl ca-certificates build-essential m4 make \
&& curl -L https://github.com/Clozure/ccl/archive/v${CCL_VERSION}.tar.gz > v${CCL_VERSION}.tar.gz \ && curl -fsSL https://github.com/Clozure/ccl/archive/v${CCL_VERSION}.tar.gz > v${CCL_VERSION}.tar.gz \
&& curl -L https://github.com/Clozure/ccl/releases/download/v${CCL_VERSION}/${PLATFORM}.tar.gz > ${PLATFORM}.tar.gz \ && curl -fsSL https://github.com/Clozure/ccl/releases/download/v${CCL_VERSION}/${PLATFORM}.tar.gz > ${PLATFORM}.tar.gz \
&& gunzip ${PLATFORM}.tar.gz \ && gunzip ${PLATFORM}.tar.gz \
&& gunzip v${CCL_VERSION}.tar.gz \ && gunzip v${CCL_VERSION}.tar.gz \
&& tar xf v${CCL_VERSION}.tar \ && tar xf v${CCL_VERSION}.tar \
...@@ -22,12 +25,13 @@ RUN set -x \ ...@@ -22,12 +25,13 @@ RUN set -x \
&& rm -rf v${CCL_VERSION}.tar ${PLATFORM}.tar \ && rm -rf v${CCL_VERSION}.tar ${PLATFORM}.tar \
&& apt-get remove -y curl ca-certificates build-essential m4 make \ && apt-get remove -y curl ca-certificates build-essential m4 make \
&& apt-get autoremove -y \ && apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/* \
&& ccl --version
WORKDIR / WORKDIR /
COPY docker-entrypoint /usr/local/bin/docker-entrypoint COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint"] ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["ccl"] CMD ["ccl"]
FROM debian:stretch FROM PLACEHOLDER
LABEL maintainer="etimmons@mit.edu" ENV CCL_VERSION PLACEHOLDER
ENV CCL_VERSION=1.12
ARG PLATFORM=linuxarm
ARG CCL_SCRIPT=ccl
WORKDIR /usr/local/src/ WORKDIR /usr/local/src/
# hadolint ignore=DL3003,DL3008 # hadolint ignore=DL3003,DL3008
RUN set -x \ RUN set -x \
&& apt-get update \ && case "$(dpkg --print-architecture)" in \
&& apt-get install -y --no-install-recommends curl ca-certificates build-essential m4 make \ armhf) PLATFORM=linuxarm; CCL_SCRIPT=ccl;; \
&& curl -L https://github.com/Clozure/ccl/archive/v${CCL_VERSION}.tar.gz > v${CCL_VERSION}.tar.gz \ amd64) PLATFORM=linuxx86; CCL_SCRIPT=ccl64;; \
&& curl -L https://github.com/Clozure/ccl/releases/download/v${CCL_VERSION}/${PLATFORM}.tar.gz > ${PLATFORM}.tar.gz \ *) echo "Unknown arch" >&2; exit 1;; \
esac \
&& export PLATFORM \
&& export CCL_SCRIPT \
&& curl -fsSL https://github.com/Clozure/ccl/archive/v${CCL_VERSION}.tar.gz > v${CCL_VERSION}.tar.gz \
&& curl -fsSL https://github.com/Clozure/ccl/releases/download/v${CCL_VERSION}/${PLATFORM}.tar.gz > ${PLATFORM}.tar.gz \
&& gunzip ${PLATFORM}.tar.gz \ && gunzip ${PLATFORM}.tar.gz \
&& gunzip v${CCL_VERSION}.tar.gz \ && gunzip v${CCL_VERSION}.tar.gz \
&& tar xf v${CCL_VERSION}.tar \ && tar xf v${CCL_VERSION}.tar \
&& mv ccl-${CCL_VERSION} ccl \ && mv ccl-${CCL_VERSION} ccl \
&& ( cd ccl && tar xf ../${PLATFORM}.tar && cp scripts/$CCL_SCRIPT /usr/local/bin/ccl && ccl -b -e "(rebuild-ccl :full t)" ) \ && ( cd ccl && tar xf ../${PLATFORM}.tar && cp scripts/$CCL_SCRIPT /usr/local/bin/ccl && ccl -b -e "(rebuild-ccl :full t)" ) \
&& rm -rf v${CCL_VERSION}.tar ${PLATFORM}.tar \ && rm -rf v${CCL_VERSION}.tar ${PLATFORM}.tar \
&& apt-get remove -y curl ca-certificates build-essential m4 make \ && ccl --version
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
WORKDIR / WORKDIR /
COPY docker-entrypoint /usr/local/bin/docker-entrypoint COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint"] ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["ccl"] CMD ["ccl"]
FROM PLACEHOLDER
# Switch to powershell and make sure it exits on error
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
ENV CCL_VERSION=1.12
RUN $srcurl = ('https://github.com/Clozure/ccl/releases/download/v{0}/ccl-{0}-windowsx86.zip' -f $env:CCL_VERSION); \
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
Write-Host ('Downloading {0}' -f $srcurl); \
Invoke-WebRequest -Uri $srcurl -OutFile ccl.zip -UserAgent "NativeHost"; \
Write-Host 'Done downloading'; \
$expectedsha256 = 'F1BA6CFF353F6E6E13828F41DC92A723C01766AE38DCFF774905C9E02D59ED04'; \
$actualsha256 = (Get-FileHash ccl.zip -Algorithm sha256).Hash; \
Write-Host ('Verifying sha256 {0} (expected: {1})' -f $actualsha256, $expectedsha256); \
if ($actualsha256 -ne $expectedsha256) { \
Write-Host 'SHA256 check FAILED!'; \
exit 1; \
}; \
Expand-Archive -Force C:\ccl.zip 'C:\Program Files\'; \
rm C:\ccl.zip; \
Add-Content -Path 'C:\Program Files\ccl\ccl.cmd' -Value '@echo off'; \
Add-Content -Path 'C:\Program Files\ccl\ccl.cmd' '\"C:\Program Files\ccl\wx86cl64.exe\"'; \
type 'C:\Program Files\ccl\ccl.cmd'
RUN $machineKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey('SYSTEM\ControlSet001\Control\Session Manager\Environment\', $true); \
$machinePath = $machineKey.GetValue('PATH', [string]::Empty, 'DoNotExpandEnvironmentNames').ToString(); \
$newPath = ('C:\Program Files\ccl;{0}' -f $machinePath); \
$machineKey.SetValue('PATH', $newPath, 'ExpandString'); \
$machineKey.Close();
CMD ["ccl"]
- [Supported Tags](#org6664acc)
- [Simple Tags](#org11b541d)
- [Shared Tags](#orgb0acb9d)
- [Quick Reference](#orgac66b5e)
- [What is CCL?](#org7e91dd4)
- [What's in the image?](#org0a8eaf9)
- [License](#org7bfb70d)