mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-16 11:48:13 +01:00
Use asciinema binary as entrypoint in Docker container
This commit is contained in:
@@ -19,4 +19,4 @@ ENV LANG en_US.utf8
|
|||||||
ENV SHELL /bin/bash
|
ENV SHELL /bin/bash
|
||||||
ENV USER docker
|
ENV USER docker
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
CMD ["asciinema", "rec"]
|
ENTRYPOINT ["/usr/local/bin/asciinema"]
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -105,17 +105,19 @@ asciinema recorder pre-installed.
|
|||||||
When running it don't forget to allocate a pseudo-TTY (`-t`), keep STDIN open
|
When running it don't forget to allocate a pseudo-TTY (`-t`), keep STDIN open
|
||||||
(`-i`) and mount config directory volume (`-v`):
|
(`-i`) and mount config directory volume (`-v`):
|
||||||
|
|
||||||
docker run --rm -ti -v "$HOME/.config/asciinema":/root/.config/asciinema asciinema/asciinema
|
docker run --rm -ti -v "$HOME/.config/asciinema":/root/.config/asciinema asciinema/asciinema rec
|
||||||
|
|
||||||
Default command run in a container is `asciinema rec`.
|
Container's entrypoint is set to `/usr/local/bin/asciinema` so you can run the
|
||||||
|
container with any arguments you would normally pass to `asciinema` binary (see
|
||||||
|
Usage section for commands and options).
|
||||||
|
|
||||||
There's not much software installed in this image though. In most cases you may
|
There's not much software installed in this image though. In most cases you may
|
||||||
want to install extra programs before recording. One option is to derive new
|
want to install extra programs before recording. One option is to derive new
|
||||||
image from this one (start your custom Dockerfile with `FROM
|
image from this one (start your custom Dockerfile with `FROM
|
||||||
asciinema/asciinema`). Another option is to start the container with `/bin/bash`
|
asciinema/asciinema`). Another option is to start the container with `/bin/bash`
|
||||||
as the command, install extra packages and manually start `asciinema rec`:
|
as the entrypoint, install extra packages and manually start `asciinema rec`:
|
||||||
|
|
||||||
docker run --rm -ti -v "$HOME/.config/asciinema":/root/.config/asciinema asciinema/asciinema /bin/bash
|
docker run --rm -ti -v "$HOME/.config/asciinema":/root/.config/asciinema --entrypoint=/bin/bash asciinema/asciinema
|
||||||
root@6689517d99a1:~# apt-get install foobar
|
root@6689517d99a1:~# apt-get install foobar
|
||||||
root@6689517d99a1:~# asciinema rec
|
root@6689517d99a1:~# asciinema rec
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user