modern-wolf-36228
12/07/2021, 10:54 AMFROM python:3.8
...
COPY n20-*.whl .
RUN --mount=type=secret,id=pipconfig,dst=/etc/pip.conf \
python -m pip install --no-cache-dir n20-*.whl
With this `BUILD`:
docker_image(
name="n20",
dependencies=["src/python/n20:wheel"],
image_tags=["{build_args.BITBUCKET_BUILD_NUMBER}"],
extra_build_args=["--secret id=pipconfig,src=pip.conf"],
repository="recital/n20-dev",
)
The pip.conf
is actually not there. Do I need to have a file()
with pip.conf
? If so, how exactly? Because I added that and it didn't work as well.curved-television-6568
12/07/2021, 12:42 PMextra_build_args
are for --build-arg
options only.. there’s currently no generic passthrough
args options for docker build.curved-television-6568
12/07/2021, 12:43 PMmodern-wolf-36228
12/07/2021, 12:44 PMmodern-wolf-36228
12/07/2021, 12:44 PMcurved-television-6568
12/07/2021, 12:46 PMmodern-wolf-36228
12/07/2021, 12:46 PMcurved-television-6568
12/07/2021, 12:46 PMmodern-wolf-36228
12/07/2021, 12:46 PMmodern-wolf-36228
12/07/2021, 12:47 PMcurved-television-6568
12/07/2021, 12:47 PMmodern-wolf-36228
12/07/2021, 12:47 PMcurved-television-6568
12/07/2021, 2:17 PMmodern-wolf-36228
12/07/2021, 2:18 PMmodern-wolf-36228
12/07/2021, 2:18 PMcurved-television-6568
12/07/2021, 2:40 PMdocker build --help
😛curved-television-6568
12/07/2021, 2:53 PMpip.conf
in the example above uses a relative path. Is that file in your buildroot, so an absolute path wouldn’t be feasible for you, or?modern-wolf-36228
12/07/2021, 2:54 PMcurved-television-6568
12/07/2021, 2:55 PMmodern-wolf-36228
12/07/2021, 2:55 PMmodern-wolf-36228
12/07/2021, 2:55 PMcurved-television-6568
12/07/2021, 2:55 PMmodern-wolf-36228
12/07/2021, 2:56 PMcurved-television-6568
12/07/2021, 2:56 PMmodern-wolf-36228
12/07/2021, 2:56 PMcurved-television-6568
12/07/2021, 3:29 PM--secret
feature on docker build.. can you confirm that --secret=id=name,src=/path/to/file
is OK? (so it doesn’t have to be --secret id=name,…
(as two args, rather than one)
Edit: nvm, it was easy enough to try locally…curved-television-6568
12/07/2021, 3:29 PMI’ll fix that.Done. 😉
happy-kitchen-89482
12/07/2021, 4:02 PMpip.conf
gitignored?modern-wolf-36228
12/07/2021, 4:03 PMhappy-kitchen-89482
12/07/2021, 4:23 PMmodern-wolf-36228
12/16/2021, 2:38 PMpants_ignore
to just allow a single file that is on the gitignore? 🤔modern-wolf-36228
12/16/2021, 2:44 PMsecrets
can look at the ignored files 😗witty-crayon-22786
12/16/2021, 4:15 PMpants_ignore
with a !
will re-include itquiet-evening-25363
12/17/2021, 4:01 PMhundreds-father-404
12/17/2021, 4:03 PMhundreds-father-404
12/17/2021, 4:04 PMquiet-evening-25363
12/17/2021, 4:04 PMcurved-television-6568
12/17/2021, 4:08 PMcurved-television-6568
12/17/2021, 4:09 PMhundreds-father-404
12/17/2021, 4:12 PMcurved-television-6568
12/17/2021, 4:19 PM"%(buildroot)s/…"
clearly tells me when that is not the case…hundreds-father-404
12/17/2021, 4:33 PMquiet-evening-25363
12/17/2021, 4:43 PMFor files relative to the current BUILD file, prefix with ./; otherwise, put the full path, e.g. ['./sibling.txt', 'resources/demo.json'].
, assuming the full path is relative to the build root, but any of the suggested options sgtm 👍curved-television-6568
12/17/2021, 8:38 PMquiet-evening-25363
12/20/2021, 2:40 PM