Git Product home page Git Product logo

smith's Issues

Always get reponame must be specified when trying to upload

I have followed the instructions and everything is working smoothly until it comes time to upload. For the life of me I can't figure out why smith can't parse the repo name. I copied and pasted the exact command in the example.

/home/nwellinghoff/smith/smith-httpd# smith upload -r \

https://nwellinghoff:@registry-1.docker.io/nwellinghoff/smith-httpd
-i smith-httpd.tar.gz
WARN[0000] pigz binary not found, falling back to internal gzip
ERRO[0000] Failed to upload image to https://nwellinghoff:@registry-1.docker.io/nwellinghoff/smith-httpd: Reponame must be specified

I am able to upload the image manually by doing a
cat smith-httpd.tar.gz | docker import - nwellinghoff/smith-httpd:latest
then
docker push nwellinghoff/smith-httpd

but it would be nice if the smith command worked as well.

Credentials not used for upload to private Docker repository with basic auth

When using smith upload -d -r https://jruser:[email protected]/reponame, the blobs POST is made without the username and password credentials. The private registry I'm using (artifactory) rejects the attempt with a 403 code because of the missing credentials.

(When I changed PrepPutObject to use req.SetBasicAuth, artifactory responded with a 404 due to a bug of its own, but that's beside the point.)

The code seems to be customized to the public Docker registry and its associated token server, and not to private ones which use the recommended basic auth setup.

Wrong annotation keys

Smith makes index.json files with the obsolete annotation keys org.opencontainers.ref.name and org.opencontainers.created. Those keys were renamed before the final 1.0 release of the image spec (see opencontainers/image-spec@8ec42b7).

This is a critical bug, because skopeo version 0.1.23 now expects the 1.0 image spec format, and it is current in the rhel7 extras repo.

No Documentation

I'm currently working on trying to transition some containers to using Smith. I am interested in the project and am looking for documentation which would help with not having to read through the source (my current solution).

Is there a source of documentation that I can refer to? If so, it may be worth linking to it in the README.

Invalid Manifest when pushing to private registry

DEBU[0000] Uploading manifests/latest
ERRO[0000] Failed to upload image to http://user:pw@registry/repo/image: Put request returned invalid response 400:
{"errors":[{"code":"MANIFEST_INVALID","message":"manifest invalid","detail":{}}]}

I receive this error when I attempt to smith upload my image.tar.gz to the registry. Taking a peek at index.json, this line sticks out:

{"schemaVersion":2,"manifests":[{"mediaType":"application/vnd.smith.spec+json",},{"mediaType":"application/vnd.oci.image.manifest.v1+json","com.oracle.smith.version":"1.1.2.12.23acefc","org.opencontainers.image.created":"2017-10-31T21:19:31Z","org.opencontainers.image.ref.name":"latest"},"platform":{"architecture":"amd64","os":"linux"}}]}

Any idea why that mediaType is pointing to v1?

smith breaks standard commands on Alpine

I'm running smith inside an Alpine Docker container. After running smith some of the standard commands are broken, like sh and ls, but pwd still works.

~ # ls
Error loading shared library libssl.so.39: No such file or directory (needed by /bin/ls)
Error loading shared library libcrypto.so.38: No such file or directory (needed by /bin/ls)
Error relocating /bin/ls: X509_NAME_get_text_by_NID: symbol not found

This does not occur in a Debian container.

Hardcoded paths to ldconfig and chmod

I tried this tool on an Alpine based image that contains one fully statically linked executable that I would like to extract. The smith.yaml file looks like this:

type: oci
package: remarkify.gz.tar
paths:
  - /usr/local/bin/remarkify
cmd:
  - /usr/local/bin/remarkify

When I run the tool I get this output:

INFO[0000] Building in /tmp/smith-build-443054379
INFO[0000] Installing package
INFO[0000] Installing package remarkify.gz.tar
WARN[0000] pigz binary not found, falling back to internal gzip
INFO[0004] Removing /tmp/smith-unpack-0
WARN[0010] chmod failed:
WARN[0010] Could not make paths readable: Error starting chmod -R go+rX /usr/local/bin/remarkify: fork/exec /usr/bin/chmod: no such file or directory
WARN[0010] ldconfig failed:
INFO[0010] Failed to install remarkify.gz.tar: Error starting ldconfig -v -N -X /: fork/exec /usr/sbin/ldconfig: no such file or directory
INFO[0010] Removing /tmp/smith-build-443054379

The executable is there:

# ls /tmp/smith-unpack-0/usr/local/bin/remarkify
/tmp/smith-unpack-0/usr/local/bin/remarkify

Doing the same thing but with a Debian based image gives the same result. I also tried with a Fedora based image, this works. To me it looks like it tries to find /usr/bin/chmod and /usr/sbin/ldconfig inside the unpacked image. These two paths don't exist in the Debian or Alpine based images. In those images these tools are located in /bin/chmod and /sbin/ldconfig.

I also tried the final example on [1], same issue.

[1] https://hackernoon.com/how-to-build-a-tiny-httpd-container-ae622c37db39

Building from local docker repo

Hello I'm trying to see if this tool can shrink my oracle-slim-7 docker image(I believe it's OCI compliant).

I have the image built locally but I don't understand how I can use smith to turn it into a microcontainer. Do I need to set up a whole registry to do this?

Created image has invalid date

I created an image using smith. I uploaded it to a local docker registry using the -d flag to convert it to a Docker image. I then pulled down the image locally and it works perfectly fine. Running docker images shows that the image was created 292 years ago. I also pushed the image to my private GitLab instance, which contains a built-in Docker registry. Viewing the registry in GitLab resulted in a 500 page and an exception was thrown due to an invalid date.

One can argue that GitLab should be able to handle this since it works fine in Docker, both locally and in my local registry. But I think it would be really nice if smith could set the date correctly, if possible.

I've already reported an issue to GitLab: https://gitlab.com/gitlab-org/gitlab-ce/issues/34988.

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.