Cloud-oriented Life

Cloud Native Technology Improves Lives

docker history

Show the history of an image

Prerequisites

Usage

1
$ docker history [OPTIONS] IMAGE

For example uses of this command, refer to the examples section below.

Options

1
2
3
4
5
Name, shorthand	Default	Description
--format Pretty-print images using a Go template
--human , -H true Print sizes and dates in human readable format
--no-trunc Don't truncate output
--quiet , -q Only show image IDs

Examples

To see how the docker:latest image was built:

1
2
3
4
$ docker history docker
(nop) ENV LC_ALL=C.UTF-8 0 B
(nop) ADD jessie.tar.xz in / 121 MB
(nop) MAINTAINER Tianon Gravi <ad 0 B

To see how the docker:apache image was added to a container’s base image:

1
2
3
$ docker history docker:scm
(nop) ADD file:1fd8d7f9f6557cafc7 373.7 MB
(nop) MAINTAINER Lokesh Mandvekar 0 B

Format the output

The formatting option (--format) will pretty-prints history output using a Go template.

Valid placeholders for the Go template are listed below:

1
2
3
4
5
6
7
Placeholder	Description
.ID Image ID
.CreatedSince Elapsed time since the image was created if --human=true, otherwise timestamp of when image was created
.CreatedAt Timestamp of when image was created
.CreatedBy Command that was used to create the image
.Size Image disk size
.Comment Comment for image

When using the --format option, the history command will either output the data exactly as the template declares or, when using the table directive, will include column headers as well.

The following example uses a template without headers and outputs the ID and CreatedSince entries separated by a colon (:) for the busybox image:

1
2
$ docker history --format "{{.ID}}: {{.CreatedSince}}" busybox
: 4 weeks ago

References

[1] docker history | Docker Documentation - https://docs.docker.com/engine/reference/commandline/history/

[2] Empowering App Development for Developers | Docker - https://www.docker.com/

Paramiko

Paramiko is a pure-Python (2.7, 3.4+) implementation of the SSHv2 protocol, providing both client and server functionality. It provides the foundation for the high-level SSH library Fabric, which is what we recommend you use for common client use-cases such as running remote shell commands or transferring files.

Direct use of Paramiko itself is only intended for users who need advanced/low-level primitives or want to run an in-Python sshd.

Read more »

redis_hash_store

RedisHashStore extends ActiveSupport’s RedisCacheStore - https://github.com/rails/rails/blob/master/activesupport/lib/active_support/cache/redis_cache_store.rb to provide the ability to easily use Redis hashes for caching.

We decided to create this gem because:

Read more »

npm FAQs

npm ERR! no space left on device

1
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

npm ERR! No Space left on device · Issue #1131 · npm/npm - https://github.com/npm/npm/issues/1131

Remove macOS FileSystem watch limit. SEE: https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers - https://gist.github.com/derekclair/25088e09d2d7147045485ddf8fd165b8

References

[1] [npm/npm: This repository is moving to: https://github.com/npm/cli - https://github.com/npm/npm(https://github.com/npm/npm)]

[2] npm community portal - https://npm.community/

[3] npm - https://www.npmjs.com/

benchmark-ips

An iterations per second enhancement to Benchmark.

FEATURES/PROBLEMS:

benchmark/ips - benchmarks a blocks iterations/second. For short snippits of code, ips automatically figures out how many times to run the code to get interesting data. No more guessing at random iteration counts!

Read more »
0%