What are the Slack Archives?
It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
hi guys. I need to install module from private repository. And I need to add public ssh key to the C
hi guys. I need to install module from private repository. And I need to add public ssh key to the CLI docker container. How can I do it? How can add this key when entering CLI container using docker/sdk cli
? thanks.
Comments
-
Hello Alex,
Is that about GitLab, GitHub or Bitbucket?
0 -
@ULYHPR789 this is about gitlab
0 -
Unfortunately, docker/sdk does not support SSH forwarding at the moment.
We are planning to use https://docs.docker.com/develop/develop-images/build_enhancements/#using-ssh-to-access-private-data-in-builds in one of the next features. However I cannot tell the estimations.
The only workaround I see is to change composer.json: https://getcomposer.org/doc/06-config.md#gitlab-token. Please, try and share your XP. Thanks.
0 -
i don';t need any ssh forawarding. I just need to add a volume which will map my host ssh key into the container. I didn't know where to add this volume. But now i found a place and all good.
0 -
It is good for workaround.
However, we in Spryker cannot force people to mount private folders inside containers. We will try to solve it different way.
Thanks for your XP.
0 -
I have new information regarding the topic.
Actually docker/sdk supports (for a long time) access to private repository using composer OOTB functionality: COMPOSER_AUTH env variable.
So the only thing you need is to export/provide the env variable before running docker/sdk. Like this:
COMPOSER_AUTH="{"github-oauth":{"[github.com](http://github.com)":"…"}}"
For gitlab, bitbucket or another, please, refer to composer docs.
Also you would need to provide .known_hosts file (in project root) that contains all hosts line-break-separated.This will work for building images and CLI.
However this method is not secure. As tokens are left in docker image logs. So the plan is to deprecate it, but only after other ways are provided.
0 -
@UPZH5HHEV I assume we need to update the documentation. Or implement the SSH supporting feature.
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 73 Spryker News
- 911 Developer Corner
- 771 Spryker Development
- 87 Spryker Dev Environment
- 361 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 69 Spryker Safari Questions
- 50 Random