Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion Sources/CLI/Application.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct Application: AsyncParsableCommand {
name: "Image",
subcommands: [
BuildCommand.self,
ImagesCommand.self,
ImageCommand.self,
RegistryCommand.self,
]
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
import ArgumentParser

extension Application {
struct ImagesCommand: AsyncParsableCommand {
struct ImageCommand: AsyncParsableCommand {
static let configuration = CommandConfiguration(
commandName: "images",
commandName: "image",
abstract: "Manage images",
subcommands: [
ImageInspect.self,
Expand All @@ -32,7 +32,7 @@ extension Application {
ImageSave.self,
ImageTag.self,
],
aliases: ["image", "i"]
aliases: ["i"]
)
}
}
10 changes: 5 additions & 5 deletions Tests/CLITests/Subcommands/Images/TestCLIImages.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Testing
class TestCLIImagesCommand: CLITest {
func doRemoveImages(images: [String]? = nil) throws {
var args = [
"images",
"image",
"rm",
]

Expand Down Expand Up @@ -49,7 +49,7 @@ class TestCLIImagesCommand: CLITest {

func doListImages() throws -> [Image] {
let (output, error, status) = try run(arguments: [
"images",
"image",
"list",
"--format",
"json",
Expand All @@ -68,7 +68,7 @@ class TestCLIImagesCommand: CLITest {

func doImageTag(image: String, newName: String) throws {
let tagArgs = [
"images",
"image",
"tag",
image,
newName,
Expand Down Expand Up @@ -261,7 +261,7 @@ extension TestCLIImagesCommand {
}
let tempFile = tempDir.appendingPathComponent(UUID().uuidString)
let saveArgs = [
"images",
"image",
"save",
alpineTagged,
busyboxTagged,
Expand All @@ -284,7 +284,7 @@ extension TestCLIImagesCommand {

// 6. load the tarball
let loadArgs = [
"images",
"image",
"load",
"-i",
tempFile.path(),
Expand Down
8 changes: 4 additions & 4 deletions Tests/CLITests/Utilities/CLITest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ class CLITest {

func inspectImage(_ name: String) throws -> String {
let response = try run(arguments: [
"images",
"image",
"inspect",
name,
])
Expand Down Expand Up @@ -349,7 +349,7 @@ class CLITest {

func doPull(imageName: String, args: [String]? = nil) throws {
var pullArgs = [
"images",
"image",
"pull",
]
if let args {
Expand All @@ -365,7 +365,7 @@ class CLITest {

func doImageListQuite() throws -> [String] {
let args = [
"images",
"image",
"list",
"-q",
]
Expand All @@ -379,7 +379,7 @@ class CLITest {

func doInspectImages(image: String) throws -> [ImageInspectOutput] {
let (output, error, status) = try run(arguments: [
"images",
"image",
"inspect",
image,
])
Expand Down
6 changes: 3 additions & 3 deletions docs/how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,17 @@ Linux c0376e0a-0bfd-4eea-9e9e-9f9a2c327051 6.1.68 #1 SMP Mon Mar 31 18:27:51 UTC
The command to push your multiplatform image to a registry is no different than that for a single-platform image:

```bash
container images push registry.example.com/fido/web-test:latest
container image push registry.example.com/fido/web-test:latest
```

## Get container or image details

`container images list` and `container list` provide basic information for all of your images and containers. You can also use `list` and `inspect` commands to print detailed JSON output for one or more resources.
`container image list` and `container list` provide basic information for all of your images and containers. You can also use `list` and `inspect` commands to print detailed JSON output for one or more resources.

Use the `inspect` command and send the result to the `jq` command to get pretty-printed JSON for the images or containers that you specify:

<pre>
% container images inspect web-test | jq
% container image inspect web-test | jq
[
{
"name": "web-test:latest",
Expand Down
10 changes: 5 additions & 5 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ CONTAINER SUBCOMMANDS:

IMAGE SUBCOMMANDS:
build Build an image from a Dockerfile
images, image, i Manage images
image, i Manage images
registry, r Manage registry configurations

SYSTEM SUBCOMMANDS:
Expand Down Expand Up @@ -151,7 +151,7 @@ The last argument `.` tells the builder to use the current directory (`web-test`
After the build completes, list the images. You should see both the base image and the image that you built in the results:

<pre>
% container images list
% container image list
NAME TAG DIGEST
python alpine b4d299311845147e7e47c970...
web-test latest 25b99501f174803e21c58f9c...
Expand Down Expand Up @@ -269,13 +269,13 @@ container registry login {registry.example.com}
Create another name for your image that includes the registry name, your repository name, and the image name, with the tag `latest`:

```bash
container images tag web-test {registry.example.com/fido}/web-test:latest
container image tag web-test {registry.example.com/fido}/web-test:latest
```

Then, push the image:

```bash
container images push {registry.example.com/fido}/web-test:latest
container image push {registry.example.com/fido}/web-test:latest
```

### Pull and run your image
Expand All @@ -284,7 +284,7 @@ To validate your published image, stop your current web server container, remove

```bash
container stop my-web-server
container images delete web-test {registry.example.com/fido}/web-test:latest
container image delete web-test {registry.example.com/fido}/web-test:latest
container run --name my-web-server --detach --rm {registry.example.com/fido}/web-test:latest
```

Expand Down