Skip to content

Commit

Permalink
Fix geodesic binary install example (#539)
Browse files Browse the repository at this point in the history
  • Loading branch information
max-lobur committed Aug 27, 2021
1 parent f3f73c1 commit 9ff0b58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions content/glossary/docker-bash.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "The docker-bash pattern"
description: "This is a SweetOps pattern used to install tooling via a terminal prompt. The primary usage is in Geodesic, which looks like: `docker run --rm cloudposse/geodesic:latest-debian | bash -s latest-debian`"
description: "This is a SweetOps pattern used to install tooling via a terminal prompt. The primary usage is in Geodesic, which looks like: `docker run --rm cloudposse/geodesic:latest-debian init | bash -s latest-debian`"
terms:
- docker-bash
tags:
Expand All @@ -13,5 +13,5 @@ tags:
The docker-bash pattern is an approach to installing software on your local machine via your terminal and docker. It utilizes `docker run` to output a script which is then piped (i.e. `|` ) into `bash`. This enables the script to execute code on your machine which then does whatever setup or installation steps it needs to do to install the target software. Geodesic utilizes this pattern via the `init` script which is expected to be piped into bash:

```
docker run --rm cloudposse/geodesic:latest-debian | bash -s latest-debian
docker run --rm cloudposse/geodesic:latest-debian init | bash -s latest-debian
```
2 changes: 1 addition & 1 deletion content/tutorials/geodesic-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Let's talk about a few of the ways that one can run Geodesic. Our toolbox has be
1. Example: `docker run -it --rm --volume $HOME:/localhost cloudposse/geodesic:latest-debian --login` opens a bash login shell (`--login` is our Docker `CMD` here; it's actually just [the arguments passed to the `bash` shell](https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html) which is our `ENTRYPOINT`) in our Geodesic container.
1. Example: `docker run -it --rm --volume $HOME:/localhost cloudposse/geodesic:latest-debian -c "terraform version"` executes the `terraform version` command as a one off and outputs the result.
1. You can **install** Geodesic onto your local machine using what we call the docker-bash pattern (e.g. `docker run ... | bash`). Similar to above, this enables a quickstart process but supports longer lived usage as it creates a callable script on your machine that enables reuse any time you want to start a shell.
1. Example: `docker run --rm cloudposse/geodesic:latest-debian | bash -s latest-debian` installs `/usr/local/bin/geodesic` on your local machine which you can execute repeatedly via simply typing `geodesic`. In this example, we're pinning the script to use the `cloudposse/geodesic:latest-debian` docker image, but we could also pin to our own image or to a specific version.
1. Example: `docker run --rm cloudposse/geodesic:latest-debian init | bash -s latest-debian` installs `/usr/local/bin/geodesic` on your local machine which you can execute repeatedly via simply typing `geodesic`. In this example, we're pinning the script to use the `cloudposse/geodesic:latest-debian` docker image, but we could also pin to our own image or to a specific version.
1. Lastly, you can **build your own toolbox** on top of Geodesic. This is what SweetOps generally recommends to practitioners. We do this when we want to provide additional packages or customization to our team while building on the foundation that geodesic provides. This is simple to do by using Geodesic as your base image (e.g. `FROM cloudposse/geodesic:latest-debian`) in your own `Dockerfile`, adding your own Docker `RUN` commands or overriding environment variables, and then using `docker build` to create a new image that you distribute to your team. This is more advanced usage and we'll cover how to do this in a future how-to article.

In this tutorial, we'll be running Geodesic standalone using `docker run` to allow us to get up and running quickly.
Expand Down

0 comments on commit 9ff0b58

Please sign in to comment.