ThinkR-open / dockerfiler

Easy Dockerfile Creation from R
https://thinkr-open.github.io/dockerfiler/
Other
169 stars 25 forks source link

enhance dock_from_renv #31

Closed VincentGuyader closed 2 years ago

VincentGuyader commented 2 years ago

enhance dock_from_renv()

statnmap commented 2 years ago

This works on my tests.
Could you test the correct build of a Dockerfile in the CI with an action completed like this one below?
Probably, in the steps, you'll need to install and run R to be able to create the Dockerfile on the fly.
You can probably also add this in the "check" Action

name: Docker Image CI

on:
  push:
    branches: [ "main", "explo-dockerfile" ]
  pull_request:
    branches: [ "main" ]

jobs:

  build:

    steps:
    - uses: actions/checkout@v3
    - name: Build the Docker image
      run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
statnmap commented 2 years ago

Could you add the copy of "renv.lock.prod" before the renv::restore() in the main Dockerfile as follows:

FROM listofcodes_socle
COPY renv.lock.prod renv.lock
RUN R -e 'renv::restore()'
VincentGuyader commented 2 years ago

@statnmap it's a golem issue: https://github.com/ThinkR-open/golem/issues/871