diff --git a/Dockerfile b/Dockerfile index 5e69824..fa166d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,8 +8,6 @@ ARG HTTPS_PROXY ARG NO_PROXY COPY sc.crt /tmp/sc.crt -RUN echo $OS_DISTRIBUTION -RUN echo $PROXY_CERT_PATH RUN if [ "${OS_DISTRIBUTION}" = "ubuntu" ] && [ "${PROXY_CERT_PATH}" != "" ]; then \ cp /tmp/sc.crt /etc/ssl/certs && \ update-ca-certificates; \ @@ -18,8 +16,6 @@ RUN if [ "${OS_DISTRIBUTION}" = "opensuse-leap" ] && [ "${PROXY_CERT_PATH}" != " cp /tmp/sc.crt /usr/share/pki/trust/anchors && \ update-ca-certificates; \ fi -RUN cat /tmp/sc.crt -RUN cat /usr/share/pki/trust/anchors/sc.crt ###########################Add any other image customizations here ####################### diff --git a/earthly.sh b/earthly.sh index 16c8757..ae61db3 100755 --- a/earthly.sh +++ b/earthly.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Uncomment the line below to enable debug mode +# set -x + function build_with_proxy() { export HTTP_PROXY=$HTTP_PROXY export HTTPS_PROXY=$HTTPS_PROXY @@ -13,7 +16,7 @@ function build_with_proxy() { docker exec -it earthly-buildkitd update-ca-certificates # Run Earthly in Docker to create artifacts Variables are passed from the .arg file - docker run --privileged -v /var/run/docker.sock:/var/run/docker.sock --rm --env EARTHLY_BUILD_ARGS -t -e GLOBAL_CONFIG="$global_config" -e EARTHLY_BUILDKIT_HOST=tcp://0.0.0.0:8372 -e BUILDKIT_TLS_ENABLED=false -v "$(pwd)":/workspace -v "$PROXY_CERT_PATH:/workspace/sc.crt:ro" gcr.io/spectro-images-public/earthly/earthly:$EARTHLY_VERSION --allow-privileged --verbose "$@" + docker run --privileged -v /var/run/docker.sock:/var/run/docker.sock --rm --env EARTHLY_BUILD_ARGS -t -e GLOBAL_CONFIG="$global_config" -e EARTHLY_BUILDKIT_HOST=tcp://0.0.0.0:8372 -e BUILDKIT_TLS_ENABLED=false -v "$(pwd)":/workspace -v "$PROXY_CERT_PATH:/workspace/sc.crt:ro" gcr.io/spectro-images-public/earthly/earthly:$EARTHLY_VERSION --allow-privileged "$@" } function build_without_proxy() {