I'm tyring to build and push a docker image to the container registry in Gitlab. I want to push an Ubuntu image based from a gitlab-ci.yml that I know works:
image: rocker/r-ver:latest
before_script:
- apt-get update && apt-get upgrade -y
- apt-get install tree curl gdebi-core -y
- apt-get install -y --no-install-recommends libxt6
- curl -LO https://quarto.org/download/latest/quarto-linux-amd64.deb
- gdebi --non-interactive quarto-linux-amd64.deb
- quarto install extension --no-prompt quarto-ext/grouped-tabsets
- R -q -e 'install.packages(c("reticulate","vetiver","pins","dplyr","checkmate","quarto","gt","tidymodels"))'
- R -q -e 'reticulate::install_miniconda()'
- R -q -e 'reticulate::conda_create(envname = "sre-wiki", packages = c("python=3.8.13", "numpy"))'
- R -q -e 'reticulate::conda_list()'
- R -e 'write("reticulate::use_condaenv(\"sre-wiki\", required = TRUE)",file=file.path(R.home(),"etc","Rprofile.site"),append=TRUE)'
- R -q -e 'reticulate::conda_install(envname = "sre-wiki", "vetiver", pip = TRUE)'
build image:
image: docker
services:
- docker:20.10.10-dind
script:
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY $CI_REGISTRY --password-stdin
- docker build -t $CI_REGISTRY_IMAGE .
- docker push $CI_REGISTRY_IMAGE
However I get the following because docker:dind by default uses alpine instead of Ubuntu.
/bin/sh: eval: line 128: apt-get: not found
I do not want to use alpine for various reasons, and want to stick with ubuntu. I can't seem ti find anywhere that suggests of to do this.