New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set timestamp for nested jars #2807

Closed
philwebb opened this Issue Apr 12, 2015 · 5 comments

Comments

Projects
None yet
4 participants
@philwebb
Member

philwebb commented Apr 12, 2015

See http://bsideup.blogspot.com/2015/04/spring-boots-fat-jars-vs-docker.html?utm_content=bufferd58ba&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer

We might be able to set the timestamp of nested jars to save the $ find ./app/lib/ | xargs touch -t 0000000000.00 step.

@philwebb philwebb added this to the 1.3.0 milestone Apr 12, 2015

@philwebb philwebb closed this in 2176afb Apr 17, 2015

@philwebb

This comment has been minimized.

Show comment
Hide comment
@philwebb

philwebb Apr 17, 2015

Member

Great article @bsideup. I've made some changed to the 1.3 SNAPSHOT that should hopefully remove the xargs touch -t step.

Member

philwebb commented Apr 17, 2015

Great article @bsideup. I've made some changed to the 1.3 SNAPSHOT that should hopefully remove the xargs touch -t step.

@bsideup

This comment has been minimized.

Show comment
Hide comment
@bsideup

bsideup Apr 17, 2015

Contributor

@philwebb thanks! I will test it one more time with latest snapshot and report results here, but quick overview of changes looks promising

Contributor

bsideup commented Apr 17, 2015

@philwebb thanks! I will test it one more time with latest snapshot and report results here, but quick overview of changes looks promising

@bsideup

This comment has been minimized.

Show comment
Hide comment
@bsideup

bsideup Apr 17, 2015

Contributor

@philwebb

$ ~/Downloads/spring-1.3.0.BUILD-SNAPSHOT/bin/spring jar app.jar app.groovy
$ rm -rf app/ && unzip -q app.jar -d app
$ docker build .
Sending build context to Docker daemon 35.36 MB
Sending build context to Docker daemon
Step 0 : FROM java:8-jre
 ---> 028f36974b77
Step 1 : ADD app/lib/ /app/lib/
 ---> Using cache
 ---> 6129cc71beb8
Step 2 : ADD app/ /app/
 ---> 526bc9ab79cf
Removing intermediate container e44b31c0d41b
Step 3 : CMD java -cp /app/ org.springframework.boot.loader.JarLauncher
 ---> Running in 076cff8bd0cf
 ---> f2a53189b48b
Removing intermediate container 076cff8bd0cf
Step 4 : EXPOSE 8080
 ---> Running in 769089a37587
 ---> bdf9bb93b3d8
Removing intermediate container 769089a37587
Successfully built bdf9bb93b3d8

It works!

Contributor

bsideup commented Apr 17, 2015

@philwebb

$ ~/Downloads/spring-1.3.0.BUILD-SNAPSHOT/bin/spring jar app.jar app.groovy
$ rm -rf app/ && unzip -q app.jar -d app
$ docker build .
Sending build context to Docker daemon 35.36 MB
Sending build context to Docker daemon
Step 0 : FROM java:8-jre
 ---> 028f36974b77
Step 1 : ADD app/lib/ /app/lib/
 ---> Using cache
 ---> 6129cc71beb8
Step 2 : ADD app/ /app/
 ---> 526bc9ab79cf
Removing intermediate container e44b31c0d41b
Step 3 : CMD java -cp /app/ org.springframework.boot.loader.JarLauncher
 ---> Running in 076cff8bd0cf
 ---> f2a53189b48b
Removing intermediate container 076cff8bd0cf
Step 4 : EXPOSE 8080
 ---> Running in 769089a37587
 ---> bdf9bb93b3d8
Removing intermediate container 769089a37587
Successfully built bdf9bb93b3d8

It works!

@wilkinsona wilkinsona modified the milestones: 1.3.0, 1.3.0.M1 May 14, 2015

@thomasdarimont

This comment has been minimized.

Show comment
Hide comment
@thomasdarimont

thomasdarimont Jun 11, 2015

Just saw this - great to have that :)
One remark: shouldn't one also delete the app.jar after unpacking it into /app to shrink the container a bit? Because with the command sequence from above you have the app.jar AND the unpacked /app folder in your container - or am I missing something?

Just saw this - great to have that :)
One remark: shouldn't one also delete the app.jar after unpacking it into /app to shrink the container a bit? Because with the command sequence from above you have the app.jar AND the unpacked /app folder in your container - or am I missing something?

@bsideup

This comment has been minimized.

Show comment
Hide comment
@bsideup

bsideup Jun 11, 2015

Contributor

yeah, good catch
On Thu, 11 Jun 2015 at 12:48 PM Thomas Darimont notifications@github.com
wrote:

Just saw this - great to have that :)
One remark: shouldn't one also delete the app.jar after unpacking it into
/app to shrink the container a bit? Because with the command sequence from
above you have the app.jar AND the unpacked /app folder in your container -
or am I missing something?


Reply to this email directly or view it on GitHub
#2807 (comment)
.

Contributor

bsideup commented Jun 11, 2015

yeah, good catch
On Thu, 11 Jun 2015 at 12:48 PM Thomas Darimont notifications@github.com
wrote:

Just saw this - great to have that :)
One remark: shouldn't one also delete the app.jar after unpacking it into
/app to shrink the container a bit? Because with the command sequence from
above you have the app.jar AND the unpacked /app folder in your container -
or am I missing something?


Reply to this email directly or view it on GitHub
#2807 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment