druidfi / stonehenge

Multi-project local development environment & toolset on Docker
MIT License
63 stars 6 forks source link

At random the container loses the ssh-keys #40

Open teroelonen opened 4 years ago

teroelonen commented 4 years ago

To solve this temporarily do the following:

  1. Go to stonehenge root folder and run: make addkey
  2. Go to the project with issues and run: docker-compose up -d --force
  3. Go into your container and run: ssh-add -L You should now have your keys in the container. If not - pray to god.
back-2-95 commented 3 years ago

Verified times when keys are "lost":

Rationale:

Containers have rule restart: unless-stopped which means they get restarted in case of OS or Docker gets rebooted.

But as adding keys is not part of Docker itself, that cannot be automised to happen on reboots.

Possible solution:

Change adding keys to manual operation ALWAYS. It might be security related decision as now we add default keys without asking on up'ping.

back-2-95 commented 3 years ago

There might be other occasions ofc when the whole SSH_AGENT stuff gets somehow disrupted.

back-2-95 commented 2 years ago

plist could help on mac https://github.com/druidfi/stonehenge/issues/61