containers / containers/podman-compose

podman-compose config optimize

Open
#1,030 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
6.2k
Forks
622
PR merge metrics
No merged PRs in 30d

Description

podman-compose version 1.2.0
podman version 5.2.2

`podman-compose config`
```
services:
librespeed:
container_name: librespeed
environment:
CUSTOM_RESULTS: 'false'
DB_TYPE: sqlite
PASSWORD: scwx602942
TZ: Asia/Shanghai
hostname: Arc
image: lscr.io/linuxserver/librespeed:latest
ports:
- 6080:80❗
restart: unless-stopped
```
The indentation of the port field seems to be abnormal. But it does not affect the use.
The original file content is as follows:
```
---
services:
librespeed:
image: lscr.io/linuxserver/librespeed:latest
container_name: librespeed
hostname: Arc
environment:
- TZ=Asia/Shanghai
- PASSWORD=ps
- CUSTOM_RESULTS=false #optional
- DB_TYPE=sqlite #optional
ports:
- 6080:80❗
restart: unless-stopped
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported output with podman-compose config using the provided Podman and podman-compose versions, then compare it with the original compose file. Trace the config command's output-generation entry point and verify that the port field uses normal YAML indentation without changing the configuration semantics.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.