Skip to content

[SPARK-58075][INFRA] Add --rm to docker run in do-release-docker.sh#57171

Closed
dongjoon-hyun wants to merge 1 commit into
apache:masterfrom
dongjoon-hyun:SPARK-58075
Closed

[SPARK-58075][INFRA] Add --rm to docker run in do-release-docker.sh#57171
dongjoon-hyun wants to merge 1 commit into
apache:masterfrom
dongjoon-hyun:SPARK-58075

Conversation

@dongjoon-hyun

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

This PR aims to add the --rm flag to the docker run invocation in dev/create-release/do-release-docker.sh so that the release container is removed automatically when it exits.

Why are the changes needed?

The container is started with --env-file, which injects secrets such as ASF_PASSWORD, GPG_PASSPHRASE, PYPI_API_TOKEN, and ASF_NEXUS_TOKEN. Without --rm, the stopped container remains on the host and the secrets can be read in plain text via docker inspect.

This is safe because nothing references the container after it exits, and all outputs are written to the host via the $WORKDIR volume mount.

Does this PR introduce any user-facing change?

No. This is a release script which is used by release managers.

How was this patch tested?

Manual review.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Fable 5

@dongjoon-hyun

Copy link
Copy Markdown
Member Author

Thank you, @HyukjinKwon .

dongjoon-hyun added a commit that referenced this pull request Jul 9, 2026
### What changes were proposed in this pull request?

This PR aims to add the `--rm` flag to the `docker run` invocation in `dev/create-release/do-release-docker.sh` so that the release container is removed automatically when it exits.

### Why are the changes needed?

The container is started with `--env-file`, which injects secrets such as `ASF_PASSWORD`, `GPG_PASSPHRASE`, `PYPI_API_TOKEN`, and `ASF_NEXUS_TOKEN`. Without `--rm`, the stopped container remains on the host and the secrets can be read in plain text via `docker inspect`.

This is safe because nothing references the container after it exits, and all outputs are written to the host via the `$WORKDIR` volume mount.

### Does this PR introduce _any_ user-facing change?

No. This is a release script which is used by release managers.

### How was this patch tested?

Manual review.

### Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Fable 5

Closes #57171 from dongjoon-hyun/SPARK-58075.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 0ae5d86)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@dongjoon-hyun

Copy link
Copy Markdown
Member Author

Merge Summary:

Posted by merge_spark_pr.py

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.

2 participants