Makefile konnte ./configure im Docker nicht findenLinux

Linux verstehen
Guest
 Makefile konnte ./configure im Docker nicht finden

Post by Guest »

Ich habe unten eine Docker-Datei

Code: Select all

FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base

RUN apt-get update
RUN apt-get install -y libmotif-dev build-essential

COPY . /usr/src/myapp

COPY oracle-outside-in-content-access-8.5.7.0.0-linux-x86-64/redist /usr/src/myapp/oracle-outside-in-content-access-8.5.7.0.0-linux-x86-64/sdk/demo

WORKDIR /usr/src/myapp/oracle-outside-in-content-access-8.5.7.0.0-linux-x86-64/sdk/samplecode/unix/
RUN make

WORKDIR /app

RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
USER appuser

COPY . .
Als Referenz habe ich lokal die folgenden Dateien im Verzeichnis oracle-outside-in-content-access-8.5.7.0.0-linux-x86-64/sdk/samplecode/unix/< /code>
unten ist Makefile

Code: Select all

all:     casample taredir textdemo extract_archive extract_object memoryio parsepst batch_process_ca

.PHONY: all

taredir:
@TARGET="taredir" \
MAYBE_XPRINTER="" \
TARGETDEPS="-lsc_da -lsc_ta -lsc_lo " \
./configure

textdemo:
@TARGET="textdemo" \
MAYBE_XPRINTER="" \
TARGETDEPS="-lsc_da -lsc_ta -lsc_lo -lXm -lXt -lX11" \
./configure

casample:
@TARGET="casample" \
TARGETDEPS="-lsc_da -lsc_ca -DUNIX" \
./configure

extract_archive:
@TARGET="extract_archive" \
TARGETDEPS="-lsc_da" \
./configure

extract_object:
@TARGET="extract_object" \
TARGETDEPS="-lsc_da -lsc_ca" \
./configure

memoryio:
@TARGET="memoryio" \
TARGETDEPS="-lsc_da -lsc_ca" \
./configure

parsepst:
@TARGET="parsepst" \
TARGETDEPS="-lsc_da -lsc_ca" \
./configure

batch_process_ca:
@TARGET="batch_process_ca" \
TARGETDEPS="-lsc_ca -lsc_da -DUNIX" \
./configure
und eine Konfigurationsdatei (deren Inhalt für diese Frage möglicherweise nicht relevant ist) auf demselben Pfad.
Wenn ich Docker ausführe build -t myapp-oracle-extract .
Ich erhalte die folgende Fehlermeldung.

Code: Select all

 => [base  7/11] WORKDIR /usr/src/myapp/oracle-outside-in-content-access-8.5.7.0.0-linux-x86-64/sdk/samplecode/unix/                                        1.0s
=> ERROR [base  8/11] RUN make                                                                                                                             1.9s
------
> [base  8/11] RUN make:
1.149 /bin/sh: 1: ./configure: not found
1.149 make: *** [makefile:32: casample] Error 127
------
Dockerfile:46
--------------------
44 |     WORKDIR /usr/src/myapp/oracle-outside-in-content-access-8.5.7.0.0-linux-x86-64/sdk/samplecode/unix/
45 |     # This command compiles your app using GCC, adjust for your source code
46 | >>> RUN make
47 |
48 |     WORKDIR /app
--------------------
ERROR: failed to solve: process "/bin/sh -c make" did not complete successfully: exit code: 2
Um PWD zu drucken, habe ich unten zum Makefile hinzugefügt, um zu sehen, ob die Datei vorhanden ist.

Code: Select all

print_pwd:
@echo "Current directory: $(shell pwd)"
@echo "Files:"
@ls -la

.PHONY: print_pwd
und es gab folgende Antwort.

Code: Select all

Current directory: /usr/src/myapp/oracle-outside-in-content-access-8.5.7.0.0-linux-x86-64/sdk/samplecode/unix
Files:
total 24
drwxr-xr-x  2 root root 4096 Jan 10 16:24 .
drwxr-xr-x 11 root root 4096 Nov 27 09:51 ..
-rwxr-xr-x  1 root root 3064 Nov 27 09:51 README
-rwxr-xr-x  1 root root 7544 Nov 27 09:51 configure
-rwxr-xr-x  1 root root 1710 Jan 10 16:58 makefile
In Dockerfile, um Dateien zu überprüfen, habe ich unten hinzugefügt.

Code: Select all

RUN ls -l && pwd
Es gab mir folgende Ausgabe.

Code: Select all

Step 7/13 : RUN ls -l && pwd
---> Running in f180d47b647a
total 16
-rwxr-xr-x 1 root root 3064 Nov 27 09:51 README
-rwxr-xr-x 1 root root 7544 Nov 27 09:51 configure
-rwxr-xr-x 1 root root 1710 Jan 10 16:58 makefile
/usr/src/myapp/oracle-outside-in-content-access-8.5.7.0.0-linux-x86-64/sdk/samplecode/unix
Warum ./configure nicht gefunden werden kann, obwohl es kopiert wurde. Läuft es in einem anderen Kontext? Warum makefile gefunden wird, aber keine configure-Datei

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post