white-twilight-61019
06/06/2024, 2:00 AMconfig/
|_____task/config.json
projects/
|_____project1/
|_______docker/Dockerfile
|_______project1/main.py
|_______BUILD
|_____project2/
|_______docker/Dockerfile
|_______project2/main.py
|_______BUILD
Dockerfile
FROM ubuntu:latest
COPY config/task/ /opt/config
BUILD
files(
name="configs",
sources=[
"config/**/*",
],
)
docker_image(
name="docker",
image_tags=["{build_args.GITHUB_SHA}"],
source="docker/Dockerfile",
dependencies=[
":configs",
],
)
When I run the pants package
command, I get an error saying the config/task/
folder is not found. I've tried using relative paths in dockerfile, but it didn't work. Could someone please explain how to use a config file from outside the Pants context folder?square-psychiatrist-19087
06/06/2024, 5:08 PMdocker_image
target into this directory and uses it as the context foldersquare-psychiatrist-19087
06/06/2024, 5:09 PMCOPY . /all
RUN find /all
to debug your dockerfilewhite-twilight-61019
06/08/2024, 1:47 PM