#Missing buildArgs in ContainerBuildOpts

1 messages · Page 1 of 1 (latest)

white junco
#

I tried to port some pipelines to go sdk; go sdk permits me to develop pipeline more rapidly.

I need to use --mount=type=ssh dockerfile directive, i found a workaround related to docker build args.

ARG SSH_KEY

# Adding ssh private key used to download private repos only and only if present
# If SSH KEY is not present, this dockerfile tries to use --mount=type=ssh
RUN if [ -n ${SSH_KEY+x} ]; then (mkdir -p /root/.ssh \
 && echo "    IdentityFile ~/.ssh/id_rsa" >> /etc/ssh/ssh_config \
 && echo "$SSH_KEY" > /root/.ssh/id_rsa \
 && chmod 400 /root/.ssh/id_rsa); fi

It seems go-sdk does not support build-arg options or i am missing something ?

shell yew
#

Hi @white junco,
The mount-type-ssh relies on the forward of your local ssh-agent's socket. We currently do not support it for build and exec operations. This PR was a partial solve of your issue (not for build operation though): https://github.com/dagger/dagger/pull/3691, but as you can see on the comments, it implies some more design. Can you please comment on it, so that it gets bumped in priority ?

@supple siren @distant girder @jovial canopy , it is the third time a user requests this feature

white junco
#

Do you think this can be implemented for the next release ?

shell yew