Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reproducible-website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reproducible Builds
reproducible-website
Commits
2d425f72
Commit
2d425f72
authored
2 months ago
by
Michael R. Crusoe
Browse files
Options
Downloads
Patches
Plain Diff
SOURCE_DATE_EPOCH: Add R example
parent
4cbc0195
No related branches found
No related tags found
1 merge request
!166
docs: add R SOURCE_DATE_EPOCH example
Pipeline
#802215
passed
2 months ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
_docs/source-date-epoch.md
+12
-2
12 additions, 2 deletions
_docs/source-date-epoch.md
with
12 additions
and
2 deletions
_docs/source-date-epoch.md
+
12
−
2
View file @
2d425f72
...
...
@@ -186,13 +186,13 @@ docker buildx build --output type=image,name=docker.io/username/image,push=true,
The
`rewrite-timestamp`
option is not set to
`true`
by default due to the overhead of rewriting image layers.
#### apt-get
####
#
apt-get
`RUN apt-get`
does not automatically consume
`SOURCE_DATE_EPOCH`
to install packages from the past snapshot.
<https://github.com/reproducible-containers/repro-sources-list.sh>
can be used for reconfiguring
`/etc/apt/sources.list`
to use
`https://snapshot.debian.org/archive/debian/<SOURCE_DATE_EPOCH>/`
.
#### Further information
####
#
Further information
See:
-
https://github.com/moby/buildkit/blob/master/docs/build-repro.md
-
https://github.com/docker-library/official-images/issues/16044
...
...
@@ -463,6 +463,16 @@ if (sourceDateEpoch != null) {
def
extendedTimestamp
=
buildInstant
.
toString
()
```
### R
```
r
if
(
Sys.getenv
(
"SOURCE_DATE_EPOCH"
)
==
""
)
{
current_date
<-
Sys.Date
()
}
else
{
current_date
<-
as.Date
(
as.numeric
(
Sys.getenv
(
"SOURCE_DATE_EPOCH"
))
/
86400
,
"1970-01-01"
)
}
```
### Last-resort using faketime
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment