Skip to content

A demonstration of a buildpack that can change permissions to the folders and files of the default workspace of a Paketo build.

License

Notifications You must be signed in to change notification settings

anthonydahanne/chmod-buildpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chmod buildpack

A demonstration of a buildpack that can change permissions to the folders and files of the default workspace of a Paketo build.

Inspiration came from @dmikusa and documentation here

Build the buildpack

pack buildpack package anthonydahanne/chmod:0.0.1
docker push anthonydahanne/chmod:0.0.1 

Use the buildpack

Using the project descriptor project.toml from a copy of this folder

pack build --descriptor project.toml -p apache-activemq-dist.zip my-dist \ 
  -e BP_APPLICATION_SCRIPT=apache-activemq-dist/bin/activemq \ 
  --builder paketobuildpacks/builder:base

You should see:

---> Chmod buildpack
Before
total 12
drwxr-xr-x  3 cnb  cnb  4096 May  8 00:50 .
drwxr-xr-x  1 root root 4096 May  8 00:50 ..
drwxr-xr-x 10 cnb  cnb  4096 May  2 03:08 apache-activemq-dist
Updating rights for activemq
+ chmod -R 775 ./
+ chmod -R 755 apache-activemq-dist/bin/activemq apache-activemq-dist/bin/activemq-diag apache-activemq-dist/bin/activemq.jar apache-activemq-dist/bin/env apache-activemq-dist/bin/linux-x86-32 apache-activemq-dist/bin/linux-x86-64 apache-activemq-dist/bin/macosx apache-activemq-dist/bin/wrapper.jar
+ set +x
After
total 12
drwxrwxr-x  3 cnb  cnb  4096 May  8 00:50 .
drwxr-xr-x  1 root root 4096 May  8 00:50 ..
drwxrwxr-x 10 cnb  cnb  4096 May  2 03:08 apache-activemq-dist

Easiest alternative

Or you can just simply use this command, without needing the project.toml descriptor:

pack build -p apache-activemq-dist.zip my-dist \ 
  -e BP_APPLICATION_SCRIPT=apache-activemq-dist/bin/activemq \
  -b paketo-buildpacks/syft \
  -b paketo-buildpacks/bellsoft-liberica \
  -b paketo-buildpacks/dist-zip \ 
  -b anthonydahanne/chmod:0.0.1 \ 
  --builder paketobuildpacks/builder:base

About

A demonstration of a buildpack that can change permissions to the folders and files of the default workspace of a Paketo build.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages