How to bake credential into docker image for git?

后端 未结 2 1723
粉色の甜心
粉色の甜心 2020-12-19 18:17

This is actually a question following from my previous one.

I am trying to use docker to host a personal note-taking web service and want to backup data generated by

2条回答
  •  -上瘾入骨i
    2020-12-19 18:40

    It depends on where you are running git-credential-libsecret: you need to have it installed in your image/container, not on the host.

    Note that another option would be to use a volume (see my answer to your previous question), in which case, git could be installed only on the host.

    But here, you would use git directly in your image, which means, as in this Dockerfile, you need to have in your Dockerfile:

    RUN apt-get update -y &&
    apt-get install --no-install-recommends -y libsecret-1-0 git
    

    https://github.com/electron-userland/electron-builder/blob/master/docker/base/Dockerfile

提交回复
热议问题