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

Geodesic v4 #961

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 8 commits
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
7 changes: 6 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
Nuru marked this conversation as resolved.
Show resolved Hide resolved

# Override for Makefile
[{Makefile, makefile, GNUmakefile}]
Expand All @@ -13,7 +19,6 @@ indent_size = 4
[*.yaml]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

[*.sh]
indent_style = tab
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ jobs:
TAGS="$TAGS,${{ env.ECR_REGISTRY }}${{ github.repository }}:latest-${BASE_OS}"
LATEST_TAGS="$TAGS,${{ github.repository }}:latest"
LATEST_TAGS="$LATEST_TAGS,${{ env.ECR_REGISTRY }}${{ github.repository }}:latest"
echo is_production=yes >> $GITHUB_OUTPUT
else
LATEST_TAGS="$TAGS"
echo is_production=no >> $GITHUB_OUTPUT
fi
printf "Tagging %s with " "${BASE_OS}"
if [[ "${BASE_OS}" == "$LATEST_TAG_OS" ]]; then
Expand Down Expand Up @@ -124,8 +126,8 @@ jobs:
type=semver,pattern={{version}}
type=ref,event=pr,prefix=pr-,suffix=-${{matrix.os}}
type=sha,prefix=sha-,suffix=-${{matrix.os}}
type=raw,value=latest,enable=${{ github.event_name == 'release' && github.event.action == 'published' }}
type=raw,value=latest,suffix=,enable=${{ github.event_name == 'release' && github.event.action == 'published' && matrix.os == env.LATEST_TAG_OS }}
type=raw,value=latest,enable=${{ github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease == false && steps.prepare.outputs.is_production == 'yes' }}
type=raw,value=latest,suffix=,enable=${{ github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease == false && steps.prepare.outputs.is_production == 'yes' && matrix.os == env.LATEST_TAG_OS }}
Comment on lines +129 to +130
Copy link

@coderabbitai coderabbitai bot Dec 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Consider simplifying the latest tag conditions.

The conditions for enabling latest tags are complex and repeated. Consider extracting the condition to a composite expression.

+          # Define condition for latest tag
+          IS_LATEST_CANDIDATE: ${{ github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease == false && steps.prepare.outputs.is_production == 'yes' }}
-          type=raw,value=latest,enable=${{ github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease == false && steps.prepare.outputs.is_production == 'yes' }}
-          type=raw,value=latest,suffix=,enable=${{ github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease == false  && steps.prepare.outputs.is_production == 'yes' && matrix.os == env.LATEST_TAG_OS }}
+          type=raw,value=latest,enable=${{ env.IS_LATEST_CANDIDATE }}
+          type=raw,value=latest,suffix=,enable=${{ env.IS_LATEST_CANDIDATE && matrix.os == env.LATEST_TAG_OS }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
type=raw,value=latest,enable=${{ github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease == false && steps.prepare.outputs.is_production == 'yes' }}
type=raw,value=latest,suffix=,enable=${{ github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease == false && steps.prepare.outputs.is_production == 'yes' && matrix.os == env.LATEST_TAG_OS }}
# Define condition for latest tag
IS_LATEST_CANDIDATE: ${{ github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease == false && steps.prepare.outputs.is_production == 'yes' }}
type=raw,value=latest,enable=${{ env.IS_LATEST_CANDIDATE }}
type=raw,value=latest,suffix=,enable=${{ env.IS_LATEST_CANDIDATE && matrix.os == env.LATEST_TAG_OS }}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That doesn't work

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Nuru, understood. Could you clarify what specifically isn’t working about the environment variable approach? If you can share any error messages or logs, that might help pinpoint the issue and figure out a better alternative. Otherwise, we can leave the existing logic in place. Let me know how you’d like to proceed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are attempting to set an environment variable in the with: section of an action, which doesn't work. AFAIK setting it in the env: would not make it available in the with: section either.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Nuru, indeed, GitHub Actions doesn't allow setting an environment variable in env: and then referencing it in the with: section. An alternative approach is to produce an output in one step (e.g., by echoing to $GITHUB_OUTPUT) and then reference that output in the with: section. For example:

- name: Prepare environment
  id: prepare-env
  run: |
    if [[ <condition> ]]; then
      echo "IS_LATEST_CANDIDATE=true" >> $GITHUB_OUTPUT
    else
      echo "IS_LATEST_CANDIDATE=false" >> $GITHUB_OUTPUT
    fi

- name: Docker metadata
  uses: docker/metadata-action@v5
  with:
    # ...
    tags: |
      # reference outputs from the previous step
      type=raw,value=latest,enable=${{ steps.prepare-env.outputs.IS_LATEST_CANDIDATE == 'true' }}
      type=raw,value=latest,suffix=,enable=${{ steps.prepare-env.outputs.IS_LATEST_CANDIDATE == 'true' && matrix.os == env.LATEST_TAG_OS }}

This way, you can reuse the condition across subsequent steps without having to rely on environment variables that do not get expanded in the with: block.


- name: Show metadata
run: |
Expand Down
18 changes: 3 additions & 15 deletions Dockerfile.custom
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# We always recommend pinning versions where changes are likely to break things.
# We put the versions up top here so they are easy to find and update.
# Find the latest version at https://github.com/cloudposse/geodesic/releases
ARG VERSION=2.11.0
ARG VERSION=4.0.0
# Changing base OS for Geodesic is possible by changing this arg, but
# unfortunately, the package managers are different, so it is not that simple.
ARG OS=debian
Expand Down Expand Up @@ -45,30 +45,18 @@ ENV AWS_REGION_ABBREVIATION_TYPE=fixed
ENV AWS_DEFAULT_REGION=us-west-2
ENV AWS_DEFAULT_SHORT_REGION=uw2

# Install specific versions of Terraform.
# We patch specific patch versions because Terraform will not operate
# on Terraform "states" that have been touched by later versions.
ARG TF_014_VERSION=0.14.10
ARG TF_015_VERSION=0.15.4
ARG TF_1_VERSION=1.0.4
RUN apt-get update && apt-get install -y -u \
terraform-0.14="${TF_014_VERSION}-*" terraform-0.15="${TF_015_VERSION}-*" \
terraform-1="${TF_1_VERSION}-*"
# Set Terraform 0.14.x as the default `terraform`. You can still use
# version 0.15.x by calling `terraform-0.15` or version 1.x as terraform-1
RUN update-alternatives --set terraform /usr/share/terraform/0.14/bin/terraform

# Pin kubectl minor version (must be within 1 minor version of cluster version)
# Note, however, that due to Docker layer caching and the structure of this
# particular Dockerfile, the patch version will not automatically update
# until you change the minor version or change the base Geodesic version.
# If you want, you can pin the patch level so you can update it when desired.
ARG KUBECTL_VERSION=1.20
ARG KUBECTL_VERSION=1.30
Copy link

@coderabbitai coderabbitai bot Dec 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix kubectl version - current version appears incorrect

The specified kubectl version 1.30 is not valid as the latest stable version is 1.28.

Apply this diff to fix the version:

-ARG KUBECTL_VERSION=1.30
+ARG KUBECTL_VERSION=1.28
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ARG KUBECTL_VERSION=1.30
ARG KUBECTL_VERSION=1.28

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, 1.31 is the current stable version, and 1.32.0 is out

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Nuru Thank you for clarifying. Understood that you want to keep using a more recent version (1.31 or 1.32). Since you’ve decided against reverting to 1.28, we’ll leave things as-is or update to one of those newer versions as you prefer.

(┬┬﹏┬┬)

RUN apt-get update && apt-get install kubectl-${KUBECTL_VERSION}
Nuru marked this conversation as resolved.
Show resolved Hide resolved

# Install Atmos CLI (https://github.com/cloudposse/atmos)
RUN apt-get install atmos
Nuru marked this conversation as resolved.
Show resolved Hide resolved

COPY rootfs/ /

WORKDIR /
WORKDIR /workspace
94 changes: 1 addition & 93 deletions Dockerfile.options
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ENV MAKE_INCLUDES="Makefile Makefile.*"
# This is separate so that updating it does not invalidate the Docker cache layer with all the packages installed above
# https://cloud.google.com/sdk/docs/release-notes
ARG GOOGLE_CLOUD_CLI_VERSION
ENV CLOUDSDK_CONFIG=/localhost/.config/gcloud/
ENV CLOUDSDK_CONFIG=/etc/xdg_config_home/.config/gcloud/
Nuru marked this conversation as resolved.
Show resolved Hide resolved

RUN apt-get update && apt-get install -y google-cloud-cli=${GOOGLE_CLOUD_CLI_VERSION}-\*

Expand All @@ -43,95 +43,3 @@ RUN { gcloud config set core/disable_usage_reporting true --installation && \



####################################################################################
# kops support
# If you are using Cloud Posse's kops reference architecture, you con configure it
# in your Dockerfile like this (edit as desired)

ENV KOPS_CLUSTER_NAME=example.foo.bar

ENV KOPS_MANIFEST=/conf/kops/manifest.yaml
ENV KOPS_TEMPLATE=/templates/kops/default.yaml
ENV KOPS_STATE_STORE s3://undefined
ENV KOPS_STATE_STORE_REGION us-east-1
ENV KOPS_FEATURE_FLAGS=+DrainAndValidateRollingUpdate

ENV KOPS_BASTION_PUBLIC_NAME="bastion"

ENV KUBECONFIG=/dev/shm/kubecfg
ENV KUBECONFIG_TEMPLATE=/templates/kops/kubecfg.yaml

RUN /usr/bin/kops completion bash > /etc/bash_completion.d/kops.sh

# Instance sizes for kops bastion, master nodes, and worker nodes
ENV BASTION_MACHINE_TYPE "t3.small"
ENV MASTER_MACHINE_TYPE "t3.medium"
ENV NODE_MACHINE_TYPE "t3.medium"

# Min/Max number of nodes (aka workers) per region
ENV NODE_MAX_SIZE 2
ENV NODE_MIN_SIZE 2

# end of kops support section
####################################################################################

#### ALPINE ONLY ####
# Alpine does not include the very common `glibc` GNU C Standard Library, which
# causes compatibility problems. Among other things, AWS CLI v2 does not work
# out of the box with Alpine. The following recipe installs `glibc` , and has to be run
# before installing other packages, particularly `libc6-compat`, and then,
# because it conflicts, you have to tweak a bit and then install `libc6-compat`.
# So put this in Dockerfile.alpine after setting up the package repositories
# but before installing any packages https://github.com/cloudposse/geodesic/blob/91336bf56fb7ff0d9812e01ceacc40ca59a17cce/os/alpine/Dockerfile.alpine#L81
# (Not verified)

# Install glibc and glibc-bin and the C.UTF-8 locale
ENV LANG=C.UTF-8
ARG ALPINE_GLIBC_PACKAGE_VERSION=2.33-r0
RUN apk update && apk add -u curl && \
ALPINE_GLIBC_PACKAGE_VERSION="${ALPINE_GLIBC_PACKAGE_VERSION}" && \
curl -sSLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${ALPINE_GLIBC_PACKAGE_VERSION}/glibc-${ALPINE_GLIBC_PACKAGE_VERSION}.apk &&
apk add --allow-untrusted glibc-${ALPINE_GLIBC_PACKAGE_VERSION}.apk && rm glibc-${ALPINE_GLIBC_PACKAGE_VERSION}.apk && \
curl -sSLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${ALPINE_GLIBC_PACKAGE_VERSION}/glibc-bin-${ALPINE_GLIBC_PACKAGE_VERSION}.apk &&
apk add --allow-untrusted glibc-bin-${ALPINE_GLIBC_PACKAGE_VERSION}.apk && rm glibc-bin-${ALPINE_GLIBC_PACKAGE_VERSION}.apk && \
curl -sSLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${ALPINE_GLIBC_PACKAGE_VERSION}/glibc-i18n-${ALPINE_GLIBC_PACKAGE_VERSION}.apk &&
apk add --allow-untrusted glibc-i18n-${ALPINE_GLIBC_PACKAGE_VERSION}.apk && rm glibc-i18n-${ALPINE_GLIBC_PACKAGE_VERSION}.apk && \
/usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true && \
printf "export LANG=%s\n" "$LANG" > /etc/profile.d/locale.sh && \
apk del glibc-i18n && \
rm -f /usr/glibc-compat/lib/ld-linux-x86-64.so.2 && \
/usr/glibc-compat/sbin/ldconfig


# Remove conflicting link, install libc6-compat, restore link to glibc
RUN mv /lib64/ld-linux-x86-64.so.2 /lib64/glibc-ld-linux-x86-64.so.2 && \
apk add --force-overwrite libc6-compat && \
rm -f /lib64/ld-linux-x86-64.so.2 && \
mv /lib64/glibc-ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 && \
/usr/glibc-compat/sbin/ldconfig


# Now you can install packages
# https://github.com/cloudposse/geodesic/blob/91336bf56fb7ff0d9812e01ceacc40ca59a17cce/os/alpine/Dockerfile.alpine#L81-L88


# Now you can move AWS CLI v1 aside, keep it as an alternative, and install AWS CLI v2

# Move AWS CLI v1 to aws1 and set up alternatives
RUN mv /usr/bin/aws /usr/local/bin/aws1 && \
update-alternatives --install /usr/local/bin/aws aws /usr/local/bin/aws1 1


# Install AWS CLI 2
# Get version from https://github.com/aws/aws-cli/blob/v2/CHANGELOG.rst
# We cannot automatically track the release versions, so we just install the latest
# ARG AWS_CLI_VERSION=2.1.34
RUN AWSTMPDIR=$(mktemp -d -t aws-inst-XXXXXXXXXX) && \
curl -sSsSL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64${AWS_CLI_VERSION:+-${AWS_CLI_VERSION}}.zip" -o "$AWSTMPDIR/awscliv2.zip" && \
cd $AWSTMPDIR && \
unzip -qq awscliv2.zip && \
./aws/install -i /usr/share/aws/v2 -b /usr/share/aws/v2/bin && \
update-alternatives --install /usr/local/bin/aws aws /usr/share/aws/v2/bin/aws 2 && \
rm -rf $AWSTMPDIR


13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,22 @@ build: $(DOCKER_BASE_OS).build
install: $(DOCKER_BASE_OS).install

run:
@geodesic
@$(APP_NAME)

run/solo:
@$(APP_NAME) --solo

%.run: %.build %.install
@geodesic
@$(APP_NAME)

run/check:
@if [[ -n "$$(docker ps --format '{{ .Names }}' --filter name="^/$(APP_NAME)\$$")" ]]; then \
printf "**************************************************************************\n" ; \
printf "Not launching new container because old container is still running.\n"; \
printf "Exit all running container shells gracefully or kill the container with\n\n"; \
printf " docker kill %s\n\n" "$(APP_NAME)" ; \
printf "Exit all running container shells gracefully or quit the container with\n\n"; \
printf " %s stop\n\n" "$(APP_NAME)" ; \
printf "Then, all new shells will be running in the same new container.\n\n" ; \
printf "Alternately, run \`make run/solo\` or \`$(APP_NAME) --solo\` to start a new container.\n" ; \
printf "**************************************************************************\n" ; \
exit 9 ; \
fi
Expand Down
45 changes: 42 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,20 @@ We recommend starting by using `geodesic` as a Docker base image (e.g. `FROM clo
> Starting with Geodesic 2.0, we distributed Geodesic as a multi-platform (`linux/amd64`, `linux/arm64`) Debian-based Docker image and a single-platform (`linux/amd64`) Alpine-based image.
> We moved the `cloudposse/geodesic:latest` Docker image tag from the Alpine version to the Debian version at that time.


### What’s Changed in Geodesic 4.0

Geodesic 4.0 is a major release that brings many new features and improvements. The most notable changes are:

- The first launched shell is no longer special. All shells are now equal, and you can quit them in any order.
The geodesic container remains running until the last shell exits.
- The `geodesic` command now has a `--solo` option that allows you to launch a new Geodesic container for just that one shell.
- Geodesic no longer mounts the host user's entire home directory into the container. Instead, it mounts only selected directories.
- The `geodesic stop` command has been enhanced to shut down the Geodesic container gracefully, rather than forcefully, allowing
among other things, shell scripts to run their exit handlers.

See extensive release notes for Geodesic 4.0 [here](/docs/ReleaseNotes-v4.md).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Fix the broken link to release notes.

The link to the release notes is using a relative path that might not work on GitHub. Consider using the full GitHub URL.

-See extensive release notes for Geodesic 4.0 [here](/docs/ReleaseNotes-v4.md).
+See extensive release notes for Geodesic 4.0 [here](https://github.com/cloudposse/geodesic/blob/main/docs/ReleaseNotes-v4.md).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
See extensive release notes for Geodesic 4.0 [here](/docs/ReleaseNotes-v4.md).
See extensive release notes for Geodesic 4.0 [here](https://github.com/cloudposse/geodesic/blob/main/docs/ReleaseNotes-v4.md).


### What’s Changed in Geodesic 3.0

Rather than bringing new features, Geodesic 3.0 is focused on slimming down the Docker image and removing outdated tools.
Expand Down Expand Up @@ -136,9 +150,9 @@ The `latest` tag points to the latest Debian-based image, although we recommend

### Quickstart

#### docker run
#### Installing Geodesic

Launching Gedoesic is a bit complex, so we recommend you install a launch script by running
Launching Geodesic is a bit complex, so we recommend you install a launch script by running
```
docker run --rm cloudposse/geodesic:latest-debian init | bash
```
Expand All @@ -147,14 +161,28 @@ After that, you should be able to launch Geodesic just by typing
geodesic
```

Alternately, customize the Makefile as described below and use `make install` to build your custom image
and install the launch script.

#### Running Geodesic

Geodesic has only a few commands and command-line options. The most important command is `geodesic`, which launches the Geodesic shell.
The only other command you might normally use is `geodesic stop`, which stops the Geodesic container, but
Geodesic automatically quits (and removes the Docker container) when you exit the last shell, so you should rarely need to use `geodesic stop`.

Run `geodesic help` for a list of command-line options.

See [customization](/docs/customization.md) documentation for information on how to customize your Geodesic environment.
Geodesic has many customization options, but they are most commonly set in configuration files, not on the command line.

### Customizing your Docker image

In general we recommend creating a customized version of Geodesic by creating your own `Dockerfile` starting with
```
# We always recommend pinning versions to avoid surprises and breaking changes.
# We put the version up top here so it is easy to find and update.
# Find the latest version at https://github.com/cloudposse/geodesic/releases
ARG VERSION=3.0.0
ARG VERSION=4.0.0
# If you don't want to bothered with updating the version, you can use `latest` instead,
# but keep in mind that as long as you have a local image with the `latest` tag,
# it will not be updated by `docker run`. You will have to explicitly pull the latest image.
Expand All @@ -170,6 +198,17 @@ ENV BANNER="my-custom-geodesic"

You can see some example configuration options to include in [Dockerfile.options](./Dockerfile.options).

#### Makefile customizations

We also recommend creating a `Makefile` to simplify building and running your custom image.
You can use the [Makefile](/Makefile) in this repository with minimal modifications.

- Update `DOCKER_ORG` and `DOCKER_IMAGE` to match your Docker Hub username and the name of your custom image.
- Update `DOCKER_FILE` to match the path to your custom `Dockerfile`.
- Update `APP_NAME` to give the command to launch your custom image a custom name.

Then you can build your custom image with `make build` and run it with `make run`.

Nuru marked this conversation as resolved.
Show resolved Hide resolved
#### Multi-platform gotchas

Although the Geodesic base image is provided in 2 architectures, when you do a local build
Expand Down
45 changes: 42 additions & 3 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,20 @@ introduction: |-
> Starting with Geodesic 2.0, we distributed Geodesic as a multi-platform (`linux/amd64`, `linux/arm64`) Debian-based Docker image and a single-platform (`linux/amd64`) Alpine-based image.
> We moved the `cloudposse/geodesic:latest` Docker image tag from the Alpine version to the Debian version at that time.


### What’s Changed in Geodesic 4.0

Geodesic 4.0 is a major release that brings many new features and improvements. The most notable changes are:

- The first launched shell is no longer special. All shells are now equal, and you can quit them in any order.
The geodesic container remains running until the last shell exits.
- The `geodesic` command now has a `--solo` option that allows you to launch a new Geodesic container for just that one shell.
- Geodesic no longer mounts the host user's entire home directory into the container. Instead, it mounts only selected directories.
- The `geodesic stop` command has been enhanced to shut down the Geodesic container gracefully, rather than forcefully, allowing
among other things, shell scripts to run their exit handlers.

See extensive release notes for Geodesic 4.0 [here](/docs/ReleaseNotes-v4.md).

### What’s Changed in Geodesic 3.0

Rather than bringing new features, Geodesic 3.0 is focused on slimming down the Docker image and removing outdated tools.
Expand Down Expand Up @@ -137,9 +151,9 @@ introduction: |-
usage: |-
### Quickstart

#### docker run
#### Installing Geodesic

Launching Gedoesic is a bit complex, so we recommend you install a launch script by running
Launching Geodesic is a bit complex, so we recommend you install a launch script by running
```
docker run --rm cloudposse/geodesic:latest-debian init | bash
```
Expand All @@ -148,14 +162,28 @@ usage: |-
geodesic
```

Alternately, customize the Makefile as described below and use `make install` to build your custom image
and install the launch script.

#### Running Geodesic

Geodesic has only a few commands and command-line options. The most important command is `geodesic`, which launches the Geodesic shell.
The only other command you might normally use is `geodesic stop`, which stops the Geodesic container, but
Geodesic automatically quits (and removes the Docker container) when you exit the last shell, so you should rarely need to use `geodesic stop`.

Run `geodesic help` for a list of command-line options.

See [customization](/docs/customization.md) documentation for information on how to customize your Geodesic environment.
Geodesic has many customization options, but they are most commonly set in configuration files, not on the command line.

### Customizing your Docker image

In general we recommend creating a customized version of Geodesic by creating your own `Dockerfile` starting with
```
# We always recommend pinning versions to avoid surprises and breaking changes.
# We put the version up top here so it is easy to find and update.
# Find the latest version at https://github.com/cloudposse/geodesic/releases
ARG VERSION=3.0.0
ARG VERSION=4.0.0
# If you don't want to bothered with updating the version, you can use `latest` instead,
# but keep in mind that as long as you have a local image with the `latest` tag,
# it will not be updated by `docker run`. You will have to explicitly pull the latest image.
Expand All @@ -171,6 +199,17 @@ usage: |-

You can see some example configuration options to include in [Dockerfile.options](./Dockerfile.options).

#### Makefile customizations

We also recommend creating a `Makefile` to simplify building and running your custom image.
You can use the [Makefile](/Makefile) in this repository with minimal modifications.

- Update `DOCKER_ORG` and `DOCKER_IMAGE` to match your Docker Hub username and the name of your custom image.
- Update `DOCKER_FILE` to match the path to your custom `Dockerfile`.
- Update `APP_NAME` to give the command to launch your custom image a custom name.

Then you can build your custom image with `make build` and run it with `make run`.

#### Multi-platform gotchas

Although the Geodesic base image is provided in 2 architectures, when you do a local build
Expand Down
Loading
Loading