Похожие чаты

How to put secrets in a dcoker image securely? I have

a GIT_TOKEN which I need to have it when building a dockerfile
Of course I can use github secrets for this purpose, But I want to build it on my pc or servers as well

the GIT_TOKEN must be set inside an ENV when images is being built, so I can not put it inside docker-compose

What is the best way?

7 ответов

29 просмотров

Here's y

Why would you want to have your secret inside of your container image? Never do that! Instead have your secrets in your environment. Your container host for example and mount them to the container via env variables.

Ehsan- Автор вопроса
DrBlury
Why would you want to have your secret inside of y...

Look, The image will be built this way: It clones a git repo and build an image to run the code, Since the repo is private, I need a git token and since I want to make it automate in ci, So I need to put secret somewhere What do you suggest?

Ehsan
Look, The image will be built this way: It clones ...

If you are using gitlab or github you can set secrets on repo settings and put in ci yml file

Do you mean that during your Docker build process you need to clone another private Repo to your project and start building them, so it will become some kind of sub module in your root repo. If no, there is no reason to store your git token as "Build time" envrionment variable in your Dockerfile, instead you should get your GIT token from some secrets manager and clone your repo, and then build

Ehsan- Автор вопроса
Vahagn
Do you mean that during your Docker build process ...

Yes I need to clone private repos during the dockerbuild What is the best way to pretect secrets? maybe I need to build it without ci

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта