Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Build with --link no longer works on Ubuntu 22.04 build 2.317.0 #10106

Open
2 of 14 tasks
chrisjohnson00 opened this issue Jun 21, 2024 · 5 comments
Open
2 of 14 tasks

Comments

@chrisjohnson00
Copy link

Description

When building a Docker Container which contains a COPY --link x y command, commands which reference this path fail stating

0.036 runc run failed: unable to start container process: error during container init: mkdir /src: not a directory

I have builds which succeed with the use of --link using the same version of the runner. However, all new builds fail consistently now. If it isn't the runner itself, then it could be the underlying disk infrastructure.
FWIW - All our actions are pinned to tags via hashes, so there has been no change to the action code we run.

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 11
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Fails on

   Image: ubuntu-22.04
  Version: 20240616.1.0

Last passing build was

   Image: ubuntu-22.04
  Version: 20240616.1.0

Is it regression?

No?

Expected behavior

Successful container build

Actual behavior

Any Dockerfile reference to the path containing a link fails with the following error

0.036 runc run failed: unable to start container process: error during container init: mkdir /src: not a directory

Repro steps

A simple way to reproduce this is to build:

FROM node:18-alpine AS base

WORKDIR /src

COPY --link package.json package-lock.json .

RUN ls -la /src

It will fail with the above error message.
Removing --link from the COPY results in a successful build.

@RaviAkshintala
Copy link

@chrisjohnson00 Thank you for bringing this issue to us, we are investigating on this issue and we will update you on this issue after our findings.

@RaviAkshintala
Copy link

Hi @chrisjohnson00, We tried with your repro steps it was succeeded with no errors.

Kindly retry the same.


name: Docker Image CI

on:
 push
 
jobs:
 build:
   runs-on: ubuntu-22.04

   steps:
   - uses: actions/checkout@v4

   - name: Build Docker image
     run: |
       docker build -t my-docker-image .
   - name: Run Docker image
     run: |
       docker run my-docker-image



    
  
 

@chrisjohnson00
Copy link
Author

chrisjohnson00 commented Jun 25, 2024

@RaviAkshintala I concur.
And I counter you with this workflow, which does fail. Perhaps this is a buildx issue?

name: Docker Image CI

on:
 push

jobs:
 build:
   runs-on: ubuntu-22.04

   steps:
   - uses: actions/checkout@v4

   - name: Set up Docker Buildx
     uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb  # v3.3.0, 2024-04-08

   - name: Build Docker image
     run: |
       docker buildx build -t my-docker-image .
   - name: Run Docker image
     run: |
       docker run my-docker-image

@RaviAkshintala
Copy link

@chrisjohnson00,

Could you please retry with the below modified Dockerfile.

FROM node:18-alpine AS base

WORKDIR /src

COPY --link package.json package-lock.json ./

RUN ls -la /src

@chrisjohnson00
Copy link
Author

@chrisjohnson00,

Could you please retry with the below modified Dockerfile.

FROM node:18-alpine AS base

WORKDIR /src

COPY --link package.json package-lock.json ./

RUN ls -la /src

yup, works.
Odd that COPY --link x . worked, then didn't work though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants