Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix geodesic binary install example #539

Merged
merged 2 commits into from
Aug 27, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/howto/geodesic/build-your-own-toolbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN apt-get install -y your-needed-package
docker build . -t acme:latest

# Install on your machine as your own executable toolbox
docker run --rm acme:latest | APP_NAME=acme bash -s latest-debian
docker run --rm acme:latest init | APP_NAME=acme bash -s latest-debian
Nuru marked this conversation as resolved.
Show resolved Hide resolved

# Start a new shell in your toolbox
acme
Expand Down
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.
Nuru marked this conversation as resolved.
Show resolved Hide resolved
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