35 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
e93175b37e Merge pull request #7986 from dokku/7325-cnb-buildpacks
Add support for specifying CNB buildpacks via buildpacks command
2025-11-16 02:38:25 -05:00
Jose Diaz-Gonzalez
4da1fea274 fix: use correct check for BUILDPACK_URL
Also fix lint issue
2025-11-16 01:45:11 -05:00
Jose Diaz-Gonzalez
a9127e3abd fix: correctly handle exiting the argument parsing loop 2025-11-16 01:24:28 -05:00
Jose Diaz-Gonzalez
9bda9e721f feat: add support for flags with = signs 2025-11-16 00:30:35 -05:00
Jose Diaz-Gonzalez
3b35656ae9 fix: shift the unknown arguments out
They should just be ignored.
2025-11-16 00:26:53 -05:00
Jose Diaz-Gonzalez
c3d103e46c fix: remove flag that does not make sense in build context 2025-11-15 22:39:27 -05:00
Jose Diaz-Gonzalez
a292e41015 fix: remove flags that do not make sense in build context 2025-11-15 22:33:03 -05:00
Jose Diaz-Gonzalez
58046ea6dc chore: move flags around for better organization 2025-11-15 22:28:53 -05:00
Jose Diaz-Gonzalez
8cb5989220 fix: remove manually set arguments 2025-11-15 22:27:26 -05:00
Jose Diaz-Gonzalez
97714e9c22 feat: filter out unsupported build arguments with pack
While this will require future updates if pack supports new build arguments, it also ensures builds safely consume arguments from other plugins.
2025-11-15 20:28:13 -05:00
Jose Diaz-Gonzalez
9aa471c1fd feat: add support for specifying CNB buildpacks via buildpacks command
Closes #7325
2025-11-15 16:24:22 -05:00
Jose Diaz-Gonzalez
90b29ff6e2 tests: add test for ensuring run commands work with pack-based builds
Closes #7863
2025-09-07 20:13:12 -04:00
Jose Diaz-Gonzalez
3985fdcca4 feat: allow --volume flags to be passed to pack at buildtime
Closes #7119
2025-03-09 07:23:21 -04:00
Jose Diaz-Gonzalez
a433508fb1 chore: deprecate the builder-specific pre-build-* triggers in favor of a global pre-build trigger
The pre-build 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
b19b409dd6 chore: deprecate the builder-specific post-build-* triggers in favor of a global post-build trigger
The pre-build 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
c2db3ddaba fix: add missing relabel command to docker-image-labeler for CNB builder
Closes #6138
2023-08-26 14:33:51 -04:00
Jose Diaz-Gonzalez
f8ccf52079 refactor: only use detected port mapping if override is not specified
Previously, we would always set the port mapping during a dockerfile build, making it difficult for users to override mappings. We also only _sometimes_ updated the detected port mapping, further confusing issues when users were migrating from Dockerfile to Buildpacks for builds.

Now, we always detect the port mapping during the build process, and only use that detected port mapping if an override is not specified. This greatly simplifies the experience around port mapping, as now a user can create an app, set a port mapping, and that first deploy will respect the port mapping without an additional deploy.

The builder always has the best context for what the app should be listening on, and thus we can always specify a "default" port mapping at this stage. Users can override this map as desired later.

This change also results in the removal of a ton of internal code that is now centralized in the ports plugin.

Closes #4067
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
4bc3de5540 feat: write auto-detected port mappings during a deploy
During an app build, we now auto-detect ports based on the source code. This is usually http:80:5000, with Dockerfile-based deploys having their ports extracted from the docker image or Dockerfile. Additionally, we add an https:443 mapping for any detected http:80 mapping when there is an ssl certificate, and all http port mappings are transformed to https mappings for Dockerfile-based deploys.

While the ports aren't currently consumed, a future refactor will provide the ability to fallback to the new detected ports when there is no user-specified port mapping.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
b983afe9fa feat: add builder-type and image-stage labels to all images
This allows users to further introspect where an image came from, and therefore what - if any - custom logic to perform.
2022-07-05 15:09:59 -04:00
Jose Diaz-Gonzalez
5b7464f525 refactor: use new name for pack format 2022-01-15 08:39:53 -05:00
Jose Diaz-Gonzalez
6f55b89149 refactor: simplify env var passing by using a new config:export format
Also add a test for env vars during build time for pack-built applications.
2022-01-15 08:34:02 -05:00
TheDoctor
7f213beefa Mirror env behaviour from herokuish builder, adapt to pack
Docker accepts its flags as --env=FOO but pack requires --env FOO, which is why ENV_ARGS_VALUES is iterated into ENV_ARGS, then pack run through eval
2022-01-15 06:54:03 -05:00
TheDoctor
bc1aba6c7a Use exported environment vars during pack build
Config was exported, but the result never used.
2022-01-15 06:54:03 -05:00
Jose Diaz-Gonzalez
4022ebd31c refactor: allow missing project.toml
We should treat the project.toml as an optional file, as is the Procfile. Additionally, moving the file into place early will ensure there is no chance of selecting the wrong file.
2021-07-10 14:57:59 -04:00
Jose Diaz-Gonzalez
79cd7e4cab feat: do not fail build when missing project.toml 2021-07-10 14:57:57 -04:00
Jose Diaz-Gonzalez
d68473bfc2 refactor: cleanup Dockerfile and project.toml lookups 2021-07-10 14:57:57 -04:00
Jose Diaz-Gonzalez
9082c51074 feat: add ability to specify a custom project.toml path 2021-07-10 14:57:56 -04:00
Jose Diaz-Gonzalez
c969a1a742 fix: use correct variable 2021-05-30 15:31:19 -04:00
Jose Diaz-Gonzalez
3d745b7c12 chore: use one fewer variable 2021-05-30 15:30:02 -04:00
Niklas Tasler
e38905765b respect custom stack when using cloud native builder 2021-05-30 17:54:39 +02:00
Jose Diaz-Gonzalez
1ec71cd509 refactor: switch detected builder so first one wins
Also rename internal cnb references to pack (where possible).
2021-02-28 16:19:41 -05:00
Jose Diaz-Gonzalez
6462dd891c chore: rename builder-cnb to builder-pack 2021-02-28 16:19:41 -05:00