Skip to content

It's hard to copy files into a volume #38

Open
@carolynvs

Description

@carolynvs

I was trying to use a docker compose file that used this line:

services:
  svcA
    volumes:
    - ./config.yaml:/etc/config.yaml

This doesn't work because the docker host doesn't have access the files in the bundle (we are running DooD).

As a workaround, I am doing this inside the bundle to copy files into a volume, and using the existing volume in docker compose.

    echo "Creating otel-jaeger-config volume"
    docker volume create otel-jaeger-config || true
    
    echo "Copying otel config into volume..."
    docker rm otel-jaeger-helper 2&> /dev/null || true
    docker run -v otel-jaeger-config:/config --name otel-jaeger-helper busybox true
    trap "docker rm otel-jaeger-helper" EXIT

    docker cp config.yaml otel-jaeger-helper:/config

I don't think that this is that far out of a use case. It would be nice if we could figure out a way to easily copy files from the bundle into a volume that can be used later in the bundle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions