Skip to content

COPY failed: file not found in build context or excluded by .dockerignore: stat data: file does not exist #6

@dcasciotti

Description

@dcasciotti
  • cdb version:0.0.1
  • Python version:Python 3.9.1 (default, Dec 28 2020, 11:24:06)
  • Operating System:mac Catalina 10.15.7Davids-MBP:hello davidacasciotti$ docker build -t data-container .
    Sending build context to Docker daemon 1.402MB
    Step 1/17 : FROM bitnami/minideb:stretch as generator
    ---> 14c86ccce4ab
    Step 2/17 : ENV PATH /opt/conda/bin:${PATH}
    ---> Using cache
    ---> 7e4f109e5f14
    Step 3/17 : ENV LANG C.UTF-8
    ---> Using cache
    ---> 6f55f435cbd7
    Step 4/17 : RUN /bin/bash -c "install_packages wget git ca-certificates && wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda && rm Miniconda3-latest-Linux-x86_64.sh"
    ---> Using cache
    ---> b5f409e8833b
    Step 5/17 : RUN pip install cdb==0.0.1
    ---> Using cache
    ---> 25017e24efcf
    Step 6/17 : WORKDIR /data
    ---> Using cache
    ---> fb2bed680f30
    Step 7/17 : COPY ./data .
    COPY failed: file not found in build context or excluded by .dockerignore: stat data: file does not exist

Description

Describe what you were trying to get done.
Describe what happened, what went wrong, and what you expected to happen.

What I Did used Dockerfile from GitHub cab

# docker build -t data-container .
ENV PATH /opt/conda/bin:${PATH}
ENV LANG C.UTF-8
RUN /bin/bash -c "install_packages wget git ca-certificates && \
    wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
    bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda && \
    rm Miniconda3-latest-Linux-x86_64.sh"

# install cdb (update version if needed)
RUN pip install cdb==0.0.1

WORKDIR /data
COPY ./data .
RUN cdb generate /data --out /entrypoint.go

FROM golang:1.13-alpine3.10 as builder
COPY --from=generator /entrypoint.go /entrypoint.go
COPY --from=generator /data /data

# Dependencies
RUN apk add git && \
    go get github.com/vsoch/containerdb && \
    GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o /entrypoint -i /entrypoint.go

FROM scratch
LABEL MAINTAINER @vsoch
COPY --from=builder /data /data
COPY --from=builder /entrypoint /entrypoint

ENTRYPOINT ["/entrypoint"]
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions