cancel
Showing results for 
Search instead for 
Did you mean: 

invalid reference format when building a docker file

former_member754666
Discoverer
0 Kudos

I am new to SAP docker images. I try to test this system for SAP Text-Analysis; https://github.com/SAP-samples/data-intelligence-text-analysis

However, I get this error when I try to build the Dockerfile as follows;

"""

xxxx@xxxx's-MacBookPro docker % docker build -t sap-ta-sample-image .

[+] Building 0.1s (2/2) FINISHED

=> [internal] load build definition from Dockerfile 0.0s

=> => transferring dockerfile: 1.12kB 0.0s

=> [internal] load .dockerignore0.0s

=> => transferring context: 2B0.0s

failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to parse stage name "§/com.sap.datahub.linuxx86_64/sles:15.0-sap-007": invalid reference format

"""

I tried to use opensuse/leap:15.0 as another base image since it is introduced in the README in the git repository. However it also returned the same error.
Does anyone have any clue on this? Thank you so much for your help in advance! Much appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

christianschuer
Employee
Employee
0 Kudos

"§/com.sap.datahub.linuxx86_64/sles:15.0-sap-007" refers to a pre-shipped Docker Image from SAP Data Intelligence.

If you want to build the Dockerfile locally, you need to adapt a few things:

  • Use opensuse leap 15.0
  • Install python3, pip and further build tools
  • Use UTF-8 locale instead of ASCII

The resulting Dockerfile may look like this:

# FROM §/com.sap.datahub.linuxx86_64/sles:15.0-sap-007
FROM opensuse/leap:15.0

# Install tar, gzip, python3, pip3, gcc and libgthread
RUN zypper --non-interactive update && \
    zypper --non-interactive install --no-recommends --force-resolution \
    python3 python3-pip tar gzip gcc=7 gcc-c++=7 libgthread-2_0-0=2.54.3
RUN python3 -m pip --no-cache install pip --upgrade
RUN python3 -m pip --no-cache install tornado==5.0.2
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8

#### Start of original statements

RUN groupadd -g 1972 textanalysis && useradd -g 1972 -u 1972 -m textanalysis
USER 1972:1972
WORKDIR "/home/textanalysis"
ENV HOME=/home/textanalysis
ENV PATH="${PATH}:${HOME}/.local/bin"


## Scrapy


RUN python3 -m pip install scrapy --user


RUN python3 -m pip --no-cache-dir install pandas --user


RUN python3 -m pip --no-cache-dir install nltk --user


RUN python3 -m pip --no-cache-dir install spacy --user
RUN python3 -m spacy download de_core_news_sm --user
RUN python3 -m spacy download fr_core_news_sm --user
RUN python3 -m spacy download es_core_news_sm --user
RUN python3 -m spacy download en_core_web_sm --user


RUN python3 -m pip --no-cache-dir install sdi_utils --user


RUN python3 -m pip --no-cache-dir install requests --user
RUN python3 -m pip --no-cache-dir install textblob --user
RUN python3 -m pip --no-cache-dir install textblob-de --user
RUN python3 -m pip --no-cache-dir install textblob-fr --user


RUN scrapy startproject onlinemedia

former_member754666
Discoverer
0 Kudos

Thnaks! It works.

Answers (0)