Skip to content

Commit

Permalink
Remove plugin configs and move instructions
Browse files Browse the repository at this point in the history
It was discovered that the docker-compose formula is the Compose plugin.
It creates a docker-compose binary that is symlinked into the plugins
directory. This is also the case for the docker-buildx plugin. Since this
is the case it makes sense to remove the instructions for configuring the
plugins.

The Colima instructions were also moved to be a sub section under
the Docker section since Colima relies on Docker under the hood and is
simply an alternative to Docker.
  • Loading branch information
Michael Saki committed May 3, 2024
1 parent ad5f2f0 commit 8ce2503
Showing 1 changed file with 60 additions and 100 deletions.
160 changes: 60 additions & 100 deletions dev_envs/mac-env-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,64 +52,7 @@ Download the latest stable [Docker Desktop on Mac](https://www.docker.com/produc
Install it by double-clicking the downloaded `dmg` file and dragging the
Docker application file to the `Applications` folder.

### iTerm2 (recommended) ###

To set up iTerm2 - a macOS terminal replacement with some nifty features -
visit the [iTerm2 download page](https://www.iterm2.com/downloads.html) to
get the latest stable release. Install it by double-clicking the downloaded
`zip` file and dragging the extracted `iTerm` application file to the
`Applications` folder.

Once installed, run the app and select the menu option
`iTerm2 > Make iTerm2 Default Term`.

> **Note**
> You may also `Make iTerm2 Default Term` on your standard user account.
### VPN configuration ###

Once you're set up with the lab (CAL) VPN connection, we recommend you set up
split-tunneling. Instructions and a generator script are located in the
[vpn-config-gen repository](https://github.com/cisagov/vpn-config-gen).

## User environment setup ##

For this section and following sections, log back in as your standard user.

> **Note**
> If you installed iTerm2 above, run the iTerm2 app and select the menu option
> `iTerm2 > Make iTerm2 Default Term` to make it your default too.
### Automatic package installation (recommended) ###

NOTE (DEC 2022): The [CISA `laptop` script] is out of date but still
functional.

To set up a dev environment via the [CISA `laptop` script], execute
the following in your terminal:

```bash
bash <(curl --silent https://raw.githubusercontent.com/cisagov/laptop/master/laptop)
```

This will `curl` the current install files and script. You can specify
additional packages to install by creating a `Brewfile.local`, as described in
the Readme for the `laptop` repo where an example is provided.

### Manual package installation (alternative) ###

Open Terminal and install `brew` per the instructions from
[Homebrew](https://brew.sh). You will probably have to do this with `sudo`.

```console
/bin/bash -c "$(curl --fail --silent --show-error --location https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
```

After installing Brew, you'll want to install other useful
packages. We recommend installing all the packages specified in the
[CISA `laptop` script repository](https://github.com/cisagov/laptop/blob/master/Brewfile).

### Colima: A Docker alternative ###
#### Colima: A Docker alternative ####

For individuals or businesses seeking a container solution without
the licensing conditions associated with [Docker Desktop](https://www.docker.com/pricing/faq/)
Expand Down Expand Up @@ -156,50 +99,10 @@ uninstall it before proceeding.

The Docker Compose usage menu should appear.

### Optional configurations ###
#### Optional configurations ####

Enhance your Colima setup with the following optional configurations:

#### Docker Compose as a Docker plugin ####

Convert `docker-compose` to a Docker plugin for streamlined commands:

1. Create a directory for Docker CLI plugins:

```console
mkdir -p ~/.docker/cli-plugins
```

1. Symlink the `docker-compose` command:

```console
ln -sfn $(brew --prefix)/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose
```

1. Verify by running:

```console
docker compose
```

Ensure the `docker compose` usage menu is displayed.

#### Installing Buildx ####

Buildx is necessary for building some Docker containers:

1. Install Buildx with Homebrew:

```console
brew install docker-buildx
```

1. Symlink Buildx to the CLI plugins directory:

```console
ln -sfn $(brew --prefix)/opt/docker-buildx/bin/docker-buildx ~/.docker/cli-plugins/docker-buildx
```

#### Customizing VM resources ####

To customize the VM's resources, such as CPUs, memory, and disk space:
Expand All @@ -216,7 +119,7 @@ To customize the VM's resources, such as CPUs, memory, and disk space:
colima start --cpu 4 --memory 4 --disk 100
```

### Support applications that are unaware of Docker context ###
#### Support applications that are unaware of Docker context ####

In your shell profile (`.bashrc`, `.zshrc`, etc.) add the following configuration.

Expand All @@ -231,6 +134,63 @@ export DOCKER_HOST=unix://$HOME/.colima/default/docker.sock
> applications (e.g. Molecule) function as expected without Docker Desktop.
> For more information, see [here](https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running).
### iTerm2 (recommended) ###

To set up iTerm2 - a macOS terminal replacement with some nifty features -
visit the [iTerm2 download page](https://www.iterm2.com/downloads.html) to
get the latest stable release. Install it by double-clicking the downloaded
`zip` file and dragging the extracted `iTerm` application file to the
`Applications` folder.

Once installed, run the app and select the menu option
`iTerm2 > Make iTerm2 Default Term`.

> **Note**
> You may also `Make iTerm2 Default Term` on your standard user account.
### VPN configuration ###

Once you're set up with the lab (CAL) VPN connection, we recommend you set up
split-tunneling. Instructions and a generator script are located in the
[vpn-config-gen repository](https://github.com/cisagov/vpn-config-gen).

## User environment setup ##

For this section and following sections, log back in as your standard user.

> **Note**
> If you installed iTerm2 above, run the iTerm2 app and select the menu option
> `iTerm2 > Make iTerm2 Default Term` to make it your default too.
### Automatic package installation (recommended) ###

NOTE (DEC 2022): The [CISA `laptop` script] is out of date but still
functional.

To set up a dev environment via the [CISA `laptop` script], execute
the following in your terminal:

```bash
bash <(curl --silent https://raw.githubusercontent.com/cisagov/laptop/master/laptop)
```

This will `curl` the current install files and script. You can specify
additional packages to install by creating a `Brewfile.local`, as described in
the Readme for the `laptop` repo where an example is provided.

### Manual package installation (alternative) ###

Open Terminal and install `brew` per the instructions from
[Homebrew](https://brew.sh). You will probably have to do this with `sudo`.

```console
/bin/bash -c "$(curl --fail --silent --show-error --location https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
```

After installing Brew, you'll want to install other useful
packages. We recommend installing all the packages specified in the
[CISA `laptop` script repository](https://github.com/cisagov/laptop/blob/master/Brewfile).

### Environment configuration ###

For portability between computers and environments, you may want to switch
Expand Down

0 comments on commit 8ce2503

Please sign in to comment.