containers / containers/podlet

Support for Interpolation in Compose Files

Open
#81 6 comments 18 reactions 0 assignees View on GitHub
blocked enhancement
Dominant language
Rust
Stars
1.6k
Forks
48
Avg merge
1d 9h
Merged PRs (30d)
1

Description

I am trying to create systemd unit files for my [Immich](https://immich.app/) deployment from their provided docker-compose file, in which an env_file is specified and some variables are referenced by the ${VAR_NAME} syntax. Looks like podlet does not attempt to resolve them, resulting in errors like
```
Error:
0: error converting compose file
1: error reading compose file
2: File `docker-compose.yml` is not a valid compose file
3: services.immich-server.image: invalid image tag: image tag contains invalid character '$', tags must only contain ASCII letters (a-z, A-Z), digits (0-9), dots (.), underscores (_), and dashes (-) at line 16 column 12
```
While I am not sure systemd supports loading an env file and resolve variables within the unit files, it could already be a step forward to resolve the variables within podlet and have the unit files generated with static values at the time of running the command, along with perhaps a warning to the user that further changes to the env_file will not get automatically picked up by systemd units

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.