Giter Club home page Giter Club logo

Comments (8)

ecordell avatar ecordell commented on September 14, 2024

What version of docker are you using? It sounds like you have an older version that's not supporting the image labels (as builder)

The FROM golang:1.10 refers to a docker image, not your local golang installation.

from helm-app-operator-kit.

benjaminapetersen avatar benjaminapetersen commented on September 14, 2024

Aha, that makes sense. I probably should have inferred from the caps FROM...

So I'm running Docker, on Mac, @ 1.13.1.
This is intentional for other reasons on my system. Not sure if there is a handy workaround...

from helm-app-operator-kit.

benjaminapetersen avatar benjaminapetersen commented on September 14, 2024

I can give it another shot in a VM w/a current Docker & see where we land.

from helm-app-operator-kit.

benjaminapetersen avatar benjaminapetersen commented on September 14, 2024

@ecordell Updating to the latest docker (1.18).

I can now run the build (though it fails) with:

docker build -t quay.io/benjaminapetersen/myapp-operator --build-arg HELM_CHART=examples/myapp/ --build-arg API_VERSION=app.benjaminapetersen.me/v1alpha1 --build-arg KIND= MyApp .

With the output of:

Sending build context to Docker daemon  337.2MB
Step 1/20 : FROM golang:1.10 as builder
 ---> d0e7a411e3da
Step 2/20 : ARG HELM_CHART
 ---> Using cache
 ---> a601d3a18a00
Step 3/20 : ARG API_VERSION
...
... redacted ....
...
Step 18/20 : RUN mkdir /chart   && tar -xzf /chart.tgz --strip-components=1 -C /chart   && rm /chart.tgz
 ---> Running in 6a1f2e491c55
tar: invalid magic
tar: short read
The command '/bin/sh -c mkdir /chart   && tar -xzf /chart.tgz --strip-components=1 -C /chart   && rm /chart.tgz' returned a non-zero code: 1

Closer!

from helm-app-operator-kit.

benjaminapetersen avatar benjaminapetersen commented on September 14, 2024

"invalid magic" is kind of a fantastic output, btw. 😄

from helm-app-operator-kit.

alecmerdler avatar alecmerdler commented on September 14, 2024

Yes, this is because you are trying to use a local Chart directory instead of a remotely hosted compressed directory. Docker build has slightly inconsistent behavior of the ADD command.

If <src> is a local tar archive in a recognized compression format (identity, gzip, bzip2 or xz) then it is unpacked as a directory. Resources from remote URLs are not decompressed.

The reason the Dockerfile was written this way was to let users quickly create an Operator using a pre-made, remotely hosted Helm Chart. Obviously we need more logic here to determine if you are trying to use a local, uncompressed Chart directory.

Do you mind filing a separate issue or making a PR to handle this case?

from helm-app-operator-kit.

benjaminapetersen avatar benjaminapetersen commented on September 14, 2024

Issue coming right up!

from helm-app-operator-kit.

alecmerdler avatar alecmerdler commented on September 14, 2024

Fixed in #28.

from helm-app-operator-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.