mirror of
https://github.com/ko-build/ko.git
synced 2024-12-12 08:54:09 +02:00
add SOURCE_DATE_EPOCH usage (#72)
This commit is contained in:
parent
b7eb9dfe48
commit
bd404f30ef
@ -124,7 +124,6 @@ However, these same commands can be directed to operate locally as well via
|
|||||||
the `--local` or `-L` command (or setting `KO_DOCKER_REPO=ko.local`). See
|
the `--local` or `-L` command (or setting `KO_DOCKER_REPO=ko.local`). See
|
||||||
the [`minikube` section](./README.md#with-minikube) for more detail.
|
the [`minikube` section](./README.md#with-minikube) for more detail.
|
||||||
|
|
||||||
|
|
||||||
### `ko publish`
|
### `ko publish`
|
||||||
|
|
||||||
`ko publish` simply builds and publishes images for each import path passed as
|
`ko publish` simply builds and publishes images for each import path passed as
|
||||||
@ -441,6 +440,14 @@ This resulting configuration may then be installed onto Kubernetes clusters via:
|
|||||||
kubectl apply -f release.yaml
|
kubectl apply -f release.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Why are my images all created in 1970?
|
||||||
|
|
||||||
|
In order to support [reproducible builds](https://reproducible-builds.org), `ko` doesn't embed timestamps in the images it produces by default; however, `ko` does respect the [`SOURCE_DATE_EPOCH`](https://reproducible-builds.org/docs/source-date-epoch/) environment variable.
|
||||||
|
|
||||||
|
For example, you can set this to the current timestamp by executing:
|
||||||
|
export SOURCE_DATE_EPOCH=`date +%s
|
||||||
|
or to the latest git commit's timestamp with:
|
||||||
|
export SOURCE_DATE_EPOCH=$(git log -1 --format='%ct')
|
||||||
|
|
||||||
## Acknowledgements
|
## Acknowledgements
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user