mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00

- My Codespaces workflow sometimes involves `gh cs ssh` for a terminal and tmux and vim (for better or for worse). - I tried this on a `Homebrew/brew` Codespace and got this error. But it felt weird following that instruction to the letter and bloating the Docker image which we by default keep minimal. ``` ❯ gh cs ssh ? Choose codespace: Homebrew/brew (master): redesigned spork error getting ssh server details: failed to start server: Please check if an SSH server is installed in the container. If the docker image being used for the codespace does not have an SSH server, install it in your Dockerfile or, for codespaces that use Debian-based images, you can add the following to your devcontainer.json: "features": { "ghcr.io/devcontainers/features/sshd:1": { "version": "latest" } } ```
27 lines
602 B
Bash
Executable File
27 lines
602 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# fix permissions so Homebrew and Bundler don't complain
|
|
sudo chmod -R g-w,o-w /home/linuxbrew
|
|
|
|
# install Homebrew's development gems
|
|
brew install-bundler-gems --groups=sorbet
|
|
|
|
# install Homebrew formulae we might need
|
|
brew install shellcheck shfmt gh gnu-tar
|
|
|
|
# cleanup any mess
|
|
brew cleanup
|
|
|
|
# install some useful development things
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
-o Dpkg::Options::=--force-confdef \
|
|
-o Dpkg::Options::=--force-confnew \
|
|
openssh-server \
|
|
zsh \
|
|
zsh-autosuggestions
|
|
|
|
# Start the SSH server so that `gh cs ssh` works.
|
|
sudo service ssh start
|