OpenMediaVault-Plugin-Developers / openmediavault-compose

openmediavault plugin for docker-compose
14 stars 5 forks source link

Dockerfile script template causes "exec format error" #3

Closed rabesocke closed 1 year ago

rabesocke commented 1 year ago

Due to the header of the dockerfile_script.j2 file, the script can't be used as entrypoint for the Dockerfile.

{{ pillar['headers']['auto_generated'] }}
{{ pillar['headers']['warning'] }}

# script file for {{ file.name }}
# {{ file.description }}

{{ file.scriptfile }}

This leads to a file with a non-usable content for a bash script, because the shebang is not in the first line of the script.

# This file is auto-generated by openmediavault (https://www.openmediavault.org)
# WARNING: Do not edit this file, your changes will get lost.

# script file for xxx
# 

#!/bin/sh
set -e
(...)

In my opinion, the template dockerfile_script.j2 should only contain the content of the input field

{{ file.scriptfile }}
ryecoaaron commented 1 year ago

Fixed in 6.7.8 in the repo now.