You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a Dockerfile-go to the repo, mirroring the existing Dockerfile-node and Dockerfile-rust but based on the golang:latest image. Like the others, this is a convenience Dockerfile that users can build to get a container with the Fastly CLI installed.
Build/run usage is documented in comments at the bottom of the file:
Have you followed the guidelines in our Contributing document?
Have you checked to ensure there aren't other open Pull Requests for the same update/change?
User Impact
Adds a Go-based Dockerfile option alongside the existing Node and Rust ones for users who prefer to build their own Fastly CLI container. No impact on existing functionality or users.
Are there any considerations that need to be addressed for release?
None. No breaking changes, and the image is not part of any build or release pipeline.
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this being merged as-is, but it (of course) suffers from the same issues that the others do. The example command for using the image is ... compute serve, which means that Viceroy will have to be downloaded and that sort of defeats the purpose of using a container image since it isn't self-contained and requires Internet access at runtime (and the Viceroy binary will have to be downloaded every time, unlike a local CLI installation where it will only be downloaded once).
If the CLI had some command which could be used to trigger the download of the ancillary binaries that could be used in the Dockerfile to avoid this problem... but it doesn't :-)
)
### Change summary
The container images (`Dockerfile-go`, `Dockerfile-node`,
`Dockerfile-rust`) re-download Viceroy on each container start (raised
in
#1828 (review)),
this PR adds an explicit `fastly compute install-viceroy` command that
downloads and
installs the Viceroy local-testing binary.
#### Implementation
Rather than duplicate the download logic, the existing installer was
extracted out into a shared `viceroyInstaller`
(`pkg/commands/compute/viceroy.go`).
Both `compute serve` and the new command call it, so every
version/override
mechanism (the manifest's `[local_server] viceroy_version`,
`FASTLY_VICEROY_USE_PATH`)
applies identically during a pre-install. `ServeCommand.GetViceroy` is
now a thin
wrapper, so behavior is unchanged.
This is intentionally simpler than #1805 (which embeds binaries into the
CLI binary).
All Submissions:
* [x] Have you followed the guidelines in our Contributing document?
* [x] Have you checked to ensure there aren't other open [Pull
Requests](https://github.com/fastly/cli/pulls) for the same
update/change?
### New Feature Submissions:
* [x] Does your submission pass tests?
### Changes to Core Features:
* [x] Have you written new tests for your core changes, as applicable?
* [x] Have you successfully run tests with your changes locally?
### User Impact
A new `fastly compute install-viceroy` command lets users (and the
container
images) pre-install Viceroy ahead of time, so `compute serve` can start
without
needing to download it. No change to existing behavior - `compute serve`
still
installs Viceroy on demand if it isn't already present.
### Are there any considerations that need to be addressed for release?
None. No breaking changes - the command is purely additive and the
shared
extraction keeps `compute serve`'s install path identical.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change summary
Adds a
Dockerfile-goto the repo, mirroring the existingDockerfile-nodeandDockerfile-rustbut based on thegolang:latestimage. Like the others, this is a convenience Dockerfile that users can build to get a container with the Fastly CLI installed.Build/run usage is documented in comments at the bottom of the file:
All Submissions:
User Impact
Adds a Go-based Dockerfile option alongside the existing Node and Rust ones for users who prefer to build their own Fastly CLI container. No impact on existing functionality or users.
Are there any considerations that need to be addressed for release?
None. No breaking changes, and the image is not part of any build or release pipeline.