You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.Rmd
+25-6Lines changed: 25 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -32,12 +32,6 @@ You're reading the doc about version :
32
32
desc::desc_get_version()
33
33
```
34
34
35
-
The check results are:
36
-
37
-
```{r eval = TRUE}
38
-
devtools::check(quiet = TRUE)
39
-
```
40
-
41
35
## Installation
42
36
43
37
You can install dockerfiler from GitHub with:
@@ -135,6 +129,31 @@ Save your Dockerfile:
135
129
my_dock$write()
136
130
```
137
131
132
+
133
+
## Multi-stage dockerfile
134
+
135
+
Here is an example of generating a multi-stage Dockerfile directly from R: we create two Dockerfile objects, one for the build stage (builder) and one for the final stage (final), and then merge them into a single file.
136
+
137
+
```{r}
138
+
stage_1 <- Dockerfile$new(
139
+
FROM = "alpine",AS ="builder"
140
+
)
141
+
stage_1$RUN('echo "Hi from builder" > /coucou.txt')
142
+
143
+
stage_2 <- Dockerfile$new(
144
+
FROM = "ubuntu", AS = "final"
145
+
)
146
+
stage_2$COMMENT("copy /coucou.txt from builder to /truc.txt in final")
0 commit comments