Skip to content
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

Images built with pack report being 40 years old #977

Closed
rantoniuk opened this issue Dec 3, 2020 · 4 comments
Closed

Images built with pack report being 40 years old #977

rantoniuk opened this issue Dec 3, 2020 · 4 comments
Labels
type/bug Issue that reports an unexpected behaviour.

Comments

@rantoniuk
Copy link

Summary

Building any image on MacOS with pack command results in an image that is supposedly 40 years old.

pack build a:buildpack
...

$ docker images | grep buildpack
a                                          buildpack                                  0f60275c8c16        40 years ago        485MB

Environment

pack info
Pack:
  Version:  0.15.1+git-79adc30.build-1660
  OS/Arch:  darwin/amd64

Default Lifecycle Version:  0.9.3

Supported Platform APIs:  0.3, 0.4

Config:
  default-builder-image = "[REDACTED]"
docker info
Client:
 Debug Mode: false
 Plugins:
  scan: Docker Scan (Docker Inc., v0.3.4)

Server:
 Containers: 18
  Running: 0
  Paused: 0
  Stopped: 18
 Images: 268
 Server Version: 19.03.13
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8fba4e9a7d01810a393d5d25a3621dc101981175
 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.4.39-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 1.941GiB
 Name: docker-desktop
 ID: HXDL:NNL4:DMOP:EODA:UK5R:GM3U:S3KH:XHAI:FWQD:LBU6:72GE:CLZD
 Docker Root Dir: /var/lib/docker
 Debug Mode: true
  File Descriptors: 40
  Goroutines: 47
  System Time: 2020-12-03T14:57:48.4788222Z
  EventsListeners: 3
 HTTP Proxy: gateway.docker.internal:3128
 HTTPS Proxy: gateway.docker.internal:3129
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine
@rantoniuk rantoniuk added status/triage Issue or PR that requires contributor attention. type/bug Issue that reports an unexpected behaviour. labels Dec 3, 2020
@dfreilich
Copy link
Member

Hey @warden, thanks for opening the issue! This is a feature, not a bug. For more, you can see this issue: #931 (comment)

@dfreilich
Copy link
Member

For a more entertaining read, you can check out https://medium.com/buildpacks/time-travel-with-pack-e0efd8bf05db

@rantoniuk
Copy link
Author

Thanks for the reading list!
I'm a bit lost though with the argument of zeroing timestamp for the sake of reproducibility. Weren't the image SHA tags introduced for that purpose?
I'm I'm not mistaken, if my image is basing on FROM baseimage:label@shaX then I will actually always get a reproducible image with the correct timestamp using the native docker build command, right?

@dfreilich
Copy link
Member

If you use the native docker build command, I believe that docker will recreate the same image (with the same SHA), assuming you haven't cleared your cache. However, if you clear your cache (or, I believe, use --no-cache), your resulting image will have a different SHA.

@jromero jromero removed the status/triage Issue or PR that requires contributor attention. label Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Issue that reports an unexpected behaviour.
Projects
None yet
Development

No branches or pull requests

3 participants