[GH-ISSUE #697] Fix Dockerfile to allow build #355

Closed
opened 2026-02-25 20:33:24 +03:00 by kerem · 1 comment
Owner

Originally created by @at-platform24 on GitHub (Sep 19, 2025).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/697

Pre-submission checks

  • I have searched existing issues and this bug has not been reported yet
  • This is a bug report for asciinema CLI (not player or server)

Bug Description

Current build fails on Debian bookworm

$ DOCKER_BUILDKIT=1 docker build .

works with following changes.

$ git diff
diff --git a/Dockerfile b/Dockerfile
index d7de138..fbeeb60 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,11 +7,12 @@ RUN --mount=type=bind,source=src,target=src \
     --mount=type=bind,source=Cargo.lock,target=Cargo.lock \
     --mount=type=cache,target=/app/target/ \
     --mount=type=cache,target=/usr/local/cargo/registry/ \
-    <<EOF
-set -e
-cargo build --locked --release
-cp ./target/release/asciinema /usr/local/bin/
-EOF
+    set -e && \
+    export TARGET=/app/target && \
+    mkdir /app/assets && \
+    cargo build --locked --release && \
+    cp ./target/release/asciinema /usr/local/bin/asciinema && \
+    ls -la /usr/local/bin/asciinema /app/target/release /app/target
 
 FROM debian:bookworm-slim as run
 COPY --from=builder /usr/local/bin/asciinema /usr/local/bin

Docker version is as follows

$ docker version
Client:
 Version:           20.10.24+dfsg1
 API version:       1.41
 Go version:        go1.19.8
 Git commit:        297e128
 Built:             Fri Jun  6 14:40:45 2025
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.24+dfsg1
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.19.8
  Git commit:       5d6db84
  Built:            Fri Jun  6 14:40:45 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.20~ds1
  GitCommit:        1.6.20~ds1-1+deb12u1
 runc:
  Version:          1.1.5+ds1
  GitCommit:        1.1.5+ds1-1+deb12u1
 docker-init:
  Version:          0.19.0
  GitCommit:

Steps to Reproduce

  1. Run DOCKER_BUILDKIT=1 docker build .

command fails with errors.

Expected Behavior

Build should succeed and a docker image should be produced.

Operating System

Debian 12, bookworm

asciinema CLI Version

3.0.0

Installation Method

Built from source

Terminal Information

using docker build from Dockerfile in GNU bash, version 5.2.15(1)-release.

Additional Context

No response

Originally created by @at-platform24 on GitHub (Sep 19, 2025). Original GitHub issue: https://github.com/asciinema/asciinema/issues/697 ### Pre-submission checks - [x] I have searched existing issues and this bug has not been reported yet - [x] This is a bug report for asciinema CLI (not player or server) ### Bug Description Current build fails on Debian bookworm ``` $ DOCKER_BUILDKIT=1 docker build . ``` works with following changes. ``` $ git diff diff --git a/Dockerfile b/Dockerfile index d7de138..fbeeb60 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,11 +7,12 @@ RUN --mount=type=bind,source=src,target=src \ --mount=type=bind,source=Cargo.lock,target=Cargo.lock \ --mount=type=cache,target=/app/target/ \ --mount=type=cache,target=/usr/local/cargo/registry/ \ - <<EOF -set -e -cargo build --locked --release -cp ./target/release/asciinema /usr/local/bin/ -EOF + set -e && \ + export TARGET=/app/target && \ + mkdir /app/assets && \ + cargo build --locked --release && \ + cp ./target/release/asciinema /usr/local/bin/asciinema && \ + ls -la /usr/local/bin/asciinema /app/target/release /app/target FROM debian:bookworm-slim as run COPY --from=builder /usr/local/bin/asciinema /usr/local/bin ``` Docker version is as follows ``` $ docker version Client: Version: 20.10.24+dfsg1 API version: 1.41 Go version: go1.19.8 Git commit: 297e128 Built: Fri Jun 6 14:40:45 2025 OS/Arch: linux/amd64 Context: default Experimental: true Server: Engine: Version: 20.10.24+dfsg1 API version: 1.41 (minimum version 1.12) Go version: go1.19.8 Git commit: 5d6db84 Built: Fri Jun 6 14:40:45 2025 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.20~ds1 GitCommit: 1.6.20~ds1-1+deb12u1 runc: Version: 1.1.5+ds1 GitCommit: 1.1.5+ds1-1+deb12u1 docker-init: Version: 0.19.0 GitCommit: ``` ### Steps to Reproduce 1. Run `DOCKER_BUILDKIT=1 docker build .` command fails with errors. ### Expected Behavior Build should succeed and a docker image should be produced. ### Operating System Debian 12, bookworm ### asciinema CLI Version 3.0.0 ### Installation Method Built from source ### Terminal Information using docker build from Dockerfile in GNU bash, version 5.2.15(1)-release. ### Additional Context _No response_
kerem closed this issue 2026-02-25 20:33:24 +03:00
Author
Owner

@ku1ik commented on GitHub (Oct 24, 2025):

Thanks for reporting!

<!-- gh-comment-id:3443284824 --> @ku1ik commented on GitHub (Oct 24, 2025): Thanks for reporting!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asciinema#355
No description provided.