Cannot stat /tmp/tmp.xxxxx during apt-get install

I got docker build failed on circleci job.

Job:

jobs:
  build_image:
    docker:
      - image: docker:stable-git
  steps:
      - checkout
      - setup_remote_docker
      - run:
        command: |
            docker build  .

Dockerfile:

FROM datadog/agent:7

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get -y --no-install-recommends  install openssh-server

Error:

Setting up openssh-server (1:8.4p1-3) ...
stat: cannot statx '/tmp/tmp.vczLovC6DX': Operation not permitted
dpkg: error processing package openssh-server (--configure):
 installed openssh-server package post-installation script subprocess returned error exit status 1

On my local PC, docker build works well.

What’s wrong with me?

Solved:
I change executor from docker to machine.

1 Like

Yay! Thank you for the update :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.