chainguard-dev / chainguard-dev/dfc

Remove distro specific run lines when converting

Open
#89 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
103
Forks
29
PR merge metrics
No merged PRs in 30d

Description

I see a lot of dockerfiles with these types of RUN statements:

# Generate the APT cache
# ENV DEBIAN_FRONTEND=noninteractive

# Add proxy
RUN echo deb [trusted=yes] https://<host>/repository/apt-proxy-12/ bookworm main contrib non-free > /etc/apt/sources.list
RUN echo deb-src [trusted=yes] https://<host>/repository/apt-proxy-12/ bookworm main contrib non-free >> /etc/apt/sources.list

RUN echo deb [trusted=yes] https://<host>/repository/apt-proxy-12/ bookworm-updates main contrib non-free >> /etc/apt/sources.list
RUN echo deb-src [trusted=yes] https://<host>/repository/apt-proxy-12/ bookworm-updates main contrib non-free >> /etc/apt/sources.list

RUN echo deb [trusted=yes] https://<host>/repository/apt-proxy-12/ bookworm-proposed-updates main contrib non-free >> /etc/apt/sources.list
RUN echo deb-src [trusted=yes] https://<host>/repository/apt-proxy-12/ bookworm-proposed-updates main contrib non-free >> /etc/apt/sources.list

It would be nice if DFC could recognize these and either comment them out or remove them

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests; start by locating DFC's Dockerfile conversion logic for RUN instructions and reproduce the APT/proxy example. Done means conversion recognizes these distro-specific RUN lines and consistently comments them out or removes them, with a regression check for the shown patterns.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.