Code Monkey home page Code Monkey logo

Comments (6)

thockin avatar thockin commented on September 2, 2024

I'm not AGAINST trying to find a way to make this work, if someone wants to contribute tests and an implementation.

from git-sync.

cfsnate avatar cfsnate commented on September 2, 2024

I got curl working in quite an annoying and fragile way. but it works. files taken from stock debian bullseye

FROM registry.k8s.io/git-sync/git-sync:v4.2.1
USER root

ADD curl/binary/curl /usr/bin/curl

RUN chmod +x /usr/bin/curl

ADD curl/lib/libcurl.so.4.7.0 /usr/lib/aarch64-linux-gnu/libcurl.so.4

ADD curl/lib/libssl.so.1.1 /usr/lib/aarch64-linux-gnu/libssl.so.1.1

ADD curl/lib/libcrypto.so.1.1 /usr/lib/aarch64-linux-gnu/libcrypto.so.1.1

ADD curl/lib/libldap_r-2.4.so.2.11.5 /usr/lib/aarch64-linux-gnu/libldap_r-2.4.so.2

ADD curl/lib/liblber-2.4.so.2.11.5 /usr/lib/aarch64-linux-gnu/liblber-2.4.so.2

ADD slack.sh /opt/slack.sh

RUN chmod +x /opt/slack.sh

USER git-sync

will play with this a bit more tomorrow

from git-sync.

thockin avatar thockin commented on September 2, 2024

Alternatively:

  • we could offer a non-minimized Dockerfile and you could just build your own from that (meaning a much larger image)
  • we could offer a build with curl in it (57.8MB without, 58.9 with - minor)

If we want to include curl, I'd like an e2e test showing it works for some simple things (and doesn't drag in other deps, like git does :) Here's a starting point:

diff --git a/Dockerfile.in b/Dockerfile.in
index dadb69e..18fb5a3 100644
--- a/Dockerfile.in
+++ b/Dockerfile.in
@@ -60,6 +60,7 @@ RUN /stage_binaries.sh -o {ARG_STAGING} \
        -p git \
        -p openssh-client \
        -p ca-certificates \
+       -p curl \
        -p socat \
        -b /bin/grep \
        -b /bin/sed \

from git-sync.

matkovic avatar matkovic commented on September 2, 2024

Have exactly the same problems with sending notifications with webhook to slack. The way I managed to install curl into the image is with this

FROM curlimages/curl:8.6.0 AS curl_build

FROM registry.k8s.io/git-sync/git-sync:v4.1.0
USER root
COPY --from=curl_build /usr/bin/curl /usr/bin/curl
COPY --from=curl_build /usr/lib /usr/lib
COPY --from=curl_build /lib /lib

USER git-sync

curl command works, but have not tested it much yet. If I encounter problems, I can let you know

from git-sync.

thockin avatar thockin commented on September 2, 2024

If someone can help craft an e2e that mimicks a slack integration, I could merge curl. I just want to make sure I don't add curl only to find it is missing some other helper package(s).

from git-sync.

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.