We could provide default runtime Dockerfiles in the build tasks. For example, we could provide the following Dockerfile
in ods-build-go
:
FROM alpine
COPY app app
EXPOSE 8080
CMD ["./app"]
This file would be copied into the workspace if docker/Dockerfile
does not already exist.
The background of this idea is that many applications do not actually need to modify the Dockerfile
, so we do not need to require users to provide one in the first place. This would reduce the setup effort. As a further benefit, we would be able to provide updates to the Dockerfile
within the same lifecycle as the tasks, ensuring everything is up-to-date and aligned.
In theory, this concept could also be expanded to other aspects, such as sonar-project.properties
or even Helm charts.
FYI @velcrin based on our discussion just now ;)