Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 9, 2025

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original prompt

This section details on the original issue you should resolve

<issue_title>Cannot use docker transport when using docker tmpfs on /tmp</issue_title>
<issue_description>## 👻 Brief Description

When using a run_option to specify /tmp as a tmpfs, using the docker transport fails. This configuration is necessary to implement the recommended way to run systemd in a container.

Version

  • kitchen-docker (2.11.0)

Environment

Mac OS with Docker Desktop 4.2.0

Scenario

The docker transport attempts to copy a shell script to /tmp inside of the container, but when it's declared as a tmpfs, this can silently fail.

Steps to Reproduce

This .kitchen.yml should do it:

---
driver:
  name: docker
  # Required by Systemd
  run_options:
    env: container=docker
    stop-signal: SIGRTMIN+3
    tmpfs:
      - /tmp
      - /run
  volume:
    - /sys/fs/cgroup:/sys/fs/cgroup:ro

transport:
  name: docker

provisioner:
  name: dummy

platforms:
  - name: oraclelinux-7

lifecycle:
  post_create:
    - remote: touch /tmp/test

suites:
  - name: default

Expected Result

The test should complete.

Actual Result

Heavily trimmed to show only relevant bits:

       Finished creating <default-oraclelinux-7> (0m1.28s).
       [Docker] Executing command on container
       /bin/bash: /tmp/docker-223dcbd9-16d7-4dab-9beb-0d414ebe7fc8.sh: No such file or directory
#<Thread:0x0000000140bc6e70 /Users/andrew.bobulsky/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:471 run> terminated with exception (report_on_exception is true):
/Users/andrew.bobulsky/.asdf/installs/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/kitchen-docker-2.11.0/lib/kitchen/transport/docker.rb:93:in `rescue in execute': Docker failed to execute command on container. Error Details: Failed to execute command on Linux container. Failed to execute command on Docker container. Expected process to exit with [0], but received '127' (Kitchen::Transport::Docker::DockerFailed)
---- Begin output of docker -H unix:///var/run/docker.sock exec -u kitchen 2f5d7679d5a908a0f0c192bc54e489bcc1317793697538543c868b296cc29268 /bin/bash /tmp/docker-223dcbd9-16d7-4dab-9beb-0d414ebe7fc8.sh ----
STDOUT: 
STDERR: /bin/bash: /tmp/docker-223dcbd9-16d7-4dab-9beb-0d414ebe7fc8.sh: No such file or directory
---- End output of docker -H unix:///var/run/docker.sock exec -u kitchen 

➕ Additional context

I don't currently use this transport because it doesn't support kitchen login. That's a different issue that I'll probably open separately.
</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Nov 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot use docker transport when using docker tmpfs on /tmp

2 participants