blablacar / dgr

Container build and runtime tool
Apache License 2.0
248 stars 21 forks source link

how do i mount host volumes while building? #206

Closed biax closed 7 years ago

biax commented 7 years ago

i have my own private local apk repository of selfbuilt custom apk packages on my host system (/opt/apk-private/apklocal) i wish to do something like apk add --no-cache --repository /var/lib/apklocal custom.apk

so basically i want the mount only while building to install the package but no mount when running the pod.

i believe my aci-manifest.yml is wrong. anyone able to point out my error?

name: private.local/alpine-nginx
builder:
  mountPoints:
    - { from: /opt/apk-private/apklocal, to: /var/lib/apklocal }
aci:
  dependencies:
    - private.local/alpine-base
  app:
    exec:
      - /bin/bash
n0rad commented 7 years ago

if you are using alpine the same way as in examples, build scripts are run on build runlevels. At this step, you are inside the container's filesystem. builder's mount point provide mount points to the builder's filesystem. So you cannot access it.

I will look for a solution.

biax commented 7 years ago

for the time being i use a local http server as a workaround since im still testing dgr, which seems nice so far.

n0rad commented 7 years ago

fixed in v78 by adding manifest option

build:
  mountPoints:
    - { from: /opt/apk-private/apklocal, to: /var/lib/apklocal }

Should really be used for cache only.