25 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
3b040767e0 fix: add missing whitespace 2026-01-10 00:33:22 -05:00
Jose Diaz-Gonzalez
41a15a7319 fix: set DOCKER_CONFIG to the directory holding the config.json 2026-01-09 23:47:00 -05:00
Jose Diaz-Gonzalez
6a83fd053c feat: add the ability to log into a registry on a per-app basis
Closes #5324
2026-01-09 00:12:16 -05:00
Jose Diaz-Gonzalez
2937ffb880 fix: make the env vars available to containers created during the pre-release process
We still re-add them in the builder-release phase to ensure users don't set incorrect ones in a custom trigger.
2024-04-04 02:29:01 -04:00
Jose Diaz-Gonzalez
8265517a96 fix: ensure files get created with the correct permissions when building with herokuish
This will allow us to skip more chown operations - and hopefully eventually drop them completely.
2024-03-28 17:09:59 -04:00
Jose Diaz-Gonzalez
68d05b230d refactor: simplify file ownership in the container by setting the process ownership during the build process
Rather than require a heavy chown operation across various paths, just chown the files already in the built image during the release process. This ensures we can skip not-only the chown process during the container start that herokuish injects, but also the one that Dokku runs which modifies mounted container paths as well during the pre-deploy.

Note that users will need to ensure any mounted volumes don't have permissions reset by other processes or containers won't be able to access them.
2024-03-12 22:27:39 -04:00
Jose Diaz-Gonzalez
87bde84115 fix: handle case where most builders didn't detect amd64 images on arm64
Images would build but then fail to be tagged, causing deployment problems on arm64 architectures for a small number of images.

Also fix a minor issue in the nixpacks builder that caused any pre-release-builder triggers that consumed the image to get an empty string instead.
2024-03-06 19:02:08 -05:00
Jose Diaz-Gonzalez
cdd5698db9 chore: deprecate the builder-specific pre-release-* triggers in favor of a global pre-release-builder trigger
The pre-release-builder trigger takes a `BUILDER_TYPE` parameter, allowing folks to perform specific actions as needed.
2023-10-15 20:25:09 -04:00
Jose Diaz-Gonzalez
e9de0f4784 chore: cleanup builder-release hooks a little
This unifies the settings between both so they look more similar.
2023-01-21 14:39:48 -05:00
Jose Diaz-Gonzalez
a5fa3725e6 chore: remove deprecated builder-specific post-release hooks
This option was deprecated in Dokku 0.25.0.
2023-01-16 01:25:41 -05:00
Jose Diaz-Gonzalez
86985ad2c9 fix: properly build args so they expand 2022-04-20 23:18:11 -04:00
Jose Diaz-Gonzalez
6b50ba66a9 fix: properly set label args on dockerfile and herokuish-built images 2021-10-09 18:46:47 -04:00
Jose Diaz-Gonzalez
c43149f4c9 fix: lint 2021-08-18 03:23:28 -04:00
Jose Diaz-Gonzalez
3d4252f43c refactor: use a Dockerfile to speed up env var injection for herokuish app builds
Herokuish app builds currently spin up a temporary container and then commit that container. The new approach uses a Dockerfile to perform those same actions, avoiding the need for the temporary container.
2021-08-18 03:16:11 -04:00
Jose Diaz-Gonzalez
9e6091e665 feat: add a new hook for global builder-release 2021-08-04 21:49:14 -04:00
Jose Diaz-Gonzalez
9306011f70 fix: do not retag images unnecessarily
This change minimizes the work needed to be done when tagging images. It edits the image manifest directly only when necessary, allowing restarts of an app to avoid having an extra layer.

This also additionally allows to deploy images with ONBUILD directives without running the ONBUILD directives.

Lastly, users building docker images that run Dokku will need to use a new sudoer wrapper for the `docker-image-labeler` binary to work correctly. A reference version has been placed in the `docker` skeleton directory.

Closes #3931
Refs #4226
2021-01-24 02:09:53 -05:00
Jose Diaz-Gonzalez
ef490f0a05 feat: retire intermediate containers after use
Rather than waiting for the next deploy, take advantage of the retire system to retire these containers immediately.

Note that since the retire process happens out of band, the containers may stick around for up to 5 minutes, after which point they will be removed.

Customization of the wait time to retire - currently 60 seconds - is up for future debate. The containers ultimately haven't been useful for debugging, so keeping them around for longer won't help in most cases, and folks can disable the dokku-retire service (or cron) if that is desired.
2020-11-22 16:57:39 -05:00
Jose Diaz-Gonzalez
baa819c2a5 fix: add missing labels to built images
This fixes an issue where disk space is not recouped after deploys unless 'dokku cleanup' without arguments is called.

Also injects the label-schema labels as necessary.

Refs #4099
2020-08-31 02:37:04 -04:00
Jose Diaz-Gonzalez
82ad2bbd17 feat: suppress tag output 2020-03-10 22:17:42 -04:00
Jose Diaz-Gonzalez
93080498f6 fix: correct calls to docker build and import common functions 2020-02-18 23:05:52 -05:00
Jose Diaz-Gonzalez
8e4dc1c2d0 feat: label released images
This will allow us to properly handle cases where the labeled image isn't actually the correct image due to invalid builds.
2020-02-18 01:32:26 -05:00
Jose Diaz-Gonzalez
7357579af2 refactor: standardize trigger code 2020-02-10 02:40:59 -05:00
Jose Diaz-Gonzalez
44fcea0ffa refactor: use new-style docker management commands
This PR uses the new syntax for commands introduced in Docker 1.13, making it a bit easier to understand just what a particular command is trying to do.

This also pushes the long-form syntax for docker command flags, which are also easier to understand at a glance.
2019-09-15 18:55:53 -04:00
Jose Diaz-Gonzalez
9734d09ff1 feat: show error message when docker-related build commands fail
This makes it more apparent that a deploy has failed than the silent error exit that might otherwise happen.
2019-08-20 17:31:14 -04:00
Jose Diaz-Gonzalez
0a8d5eb744 refactor: add initial support for builder plugins
A builder plugin implements some method for 'building' artifacts from a given source code archive. This refactor moves the majority of the image building code into separate plugins, allowing us to implement other builders, but also simplifying the common pugin codebase.

Also move the pre-build-buildpack hook from the build-env plugin to builder-herokuish.
2019-07-30 14:42:30 -04:00