Skip to content

Allow the destination lib directory in prebuilt Dockerfile to be overridden #17750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

chainchad
Copy link
Collaborator

@chainchad chainchad commented May 15, 2025

Certain teams install shared libs in a directory other than /usr/lib.

@chainchad chainchad marked this pull request as ready for review May 15, 2025 19:43
@chainchad chainchad requested review from a team as code owners May 15, 2025 19:43
@cl-sonarqube-production
Copy link

@jinhoonbang
Copy link
Contributor

jinhoonbang commented May 16, 2025

thanks @chainchad . some questions:

  1. what artifacts end up in the LIB_PATH_DEST directory? IIUC, the capabilities/plugin binaries goes to usr/local/bin right?
  2. would it make sense to have usr/local/bin configurable as well? something like:
ARG FINAL_PLUGIN_DEST

# Copy plugins to /usr/local/bin
COPY ${PKG_PATH}/bin /usr/local/bin

# Conditionally copy to FINAL_PLUGIN_DEST only if it is set
RUN : "${FINAL_PLUGIN_DEST:=}" && \
    if [ -n "$FINAL_PLUGIN_DEST" ]; then \
        echo "FINAL_PLUGIN_DEST is set to '$FINAL_PLUGIN_DEST', copying plugins..."; \
        mkdir -p "$FINAL_PLUGIN_DEST" && mv /usr/local/bin/* "$FINAL_PLUGIN_DEST/"; \
    else \
        echo "FINAL_PLUGIN_DEST is not set, skipping plugin copy."; \
    fi

@chainchad
Copy link
Collaborator Author

chainchad commented May 20, 2025

Sorry, @jinhoonbang -- I just saw your comment.

what artifacts end up in the LIB_PATH_DEST directory?

The only use-case I'm aware of now is the libwasm share library.

the capabilities/plugin binaries goes to usr/local/bin right?

Right. This is the location that all of our binaries including chainlink get placed in the image at.

would it make sense to have usr/local/bin configurable as well? something like

We could absolutely do this but do you have a use-case or reason for needing a different bin directory?

@chainchad
Copy link
Collaborator Author

Closing as it turns out a custom lib path may not be needed after all. @jinhoonbang would need a custom bin path but it looks like he can update things on his side to work with the existing /usr/local/bin path for plugins.

@chainchad chainchad closed this May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants