Replies: 3 comments 5 replies
-
Hi @S1d0 , I'm attempting to reproduce the build error. I've copied the Dockerfile.tmpl you've provided above, but also added the required FROM debian:stretch
ARG BUNDLE_DIR
RUN apt-get update && \
apt-get install -y ca-certificates
RUN apt-get update && \
apt-get install -y apt-transport-https curl && \
curl -o kubectl https://storage.googleapis.com/kubernetes-release/release/v1.19.0/bin/linux/amd64/kubectl && \
mv kubectl /usr/local/bin && \
chmod a+x /usr/local/bin/kubectl
RUN curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 && \
chmod 700 get_helm.sh && \
./get_helm.sh
RUN apt-get update && \
apt-get -y install python-pip && \
pip install --upgrade pip
COPY . $BUNDLE_DIR On my setup (Mac OS X, Docker for Mac), it builds with no errors. I'm using Porter built from the most recent commit of the Can you supply similar details? From the errors above, my first guess is Docker daemon issues ( |
Beta Was this translation helpful? Give feedback.
-
Hi @vdice, my porter version is v0.30.1 (2931a5c) thanks for your replay. I found out that problem is not in porter.yaml or Dockerfile.tmpl so you are probably right it is docker deamon. I follow https://porter.sh/best-practices/minikube/ but it still doesn't work. |
Beta Was this translation helpful? Give feedback.
-
Ah, thank you for the clarification. I see now the issue is when attempting to use Minikube's docker daemon when building bundles via Porter. Indeed, I reproduce the same/similar errors when I try this ( I'll need to look through Porter's build code to find out what is going wrong. I am curious on why this doesn't work currently. In the meantime, though perhaps not clear (as you've pointed out), the current minikube doc/usage notes for Porter are for using minikube as an underlying k8s cluster to install a bundle on to. In other words, to inject the minikube kubeconfig at runtime when installing/upgrading a bundle. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I searched but didn't find anything about this topic. In my project we have private docker repository and we work wit AIR GAP enviroment. I'm trying to create custom image from debian:stretch with all needed parts already installed on board to make sure the new base image has no-op's for apt and curl when they are invoked (and possibly other commands; not sure yet), so they don't require online access when applied when building the porter invocation image.
For local development we are using minikube as kubernetes cluster
Assumption is to use exec, helm3 and kubernetes mixin.
here is dockerfile that i came up.
`FROM debian:stretch
RUN apt-get update &&
apt-get install -y ca-certificates
RUN apt-get update &&
apt-get install -y apt-transport-https curl &&
curl -o kubectl https://storage.googleapis.com/kubernetes-release/release/v1.19.0/bin/linux/amd64/kubectl &&
mv kubectl /usr/local/bin &&
chmod a+x /usr/local/bin/kubectl
RUN curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 &&
chmod 700 get_helm.sh &&
./get_helm.sh
RUN apt-get update &&
apt-get -y install python-pip &&
pip install --upgrade pip`
but it's failing to porter build with error message:
"Error: unable to build CNAB invocation image: Error response from daemon: Client sent an HTTP request to an HTTPS server."
Steps to recreate:
Error:
Starting Invocation Image Build =======>
time="2020-11-27T12:01:15+01:00" level=error msg="Can't add file \\?\C:\project\cloud\deployment\porter\bundle\.cnab\app\mixins\exec\exec.exe to tar: io: read/write on closed pipe"
time="2020-11-27T12:01:15+01:00" level=error msg="Can't close tar writer: io: read/write on closed pipe"
Error: unable to build CNAB invocation image: error during connect: Post http://192.168.108.51:2376/v1.24/build?buildargs=%7B%22BUNDLE_DIR%22%3A%22%2Fcnab%2Fapp%22%7D&cachefrom=null&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=null&memory=0&memswap=0&networkmode=&rm=1&shmsize=0&t=sitaware%2Fcloud-app-installer%3Av0.1.0&target=&ulimits=null&version=: write tcp 192.168.108.49:54390->192.168.108.51:2376: wsasend: An existing connection was forcibly closed by the remote host.
Can anyone could help me to understand what's happening?
Beta Was this translation helpful? Give feedback.
All reactions