-1

I wrote a Dockerfile and trying to run the build. But every time, I run it, I see the below error:

[+] Building 2.5s (1/1) FINISHED                                                                                                       docker:desktop-linux
 => [internal] load remote build context                                                                                                               2.4s
context:1
--------------------
   1 | >>> <!DOCTYPE html>
   2 |     <html lang="en">
   3 |     <head>
--------------------
ERROR: failed to build: failed to solve: dockerfile parse error on line 1: unknown instruction: <!DOCTYPE

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/pfd1w088kkfd2n7jdz40ddt38

So I deleted most of the line and only kept two lines, but I still get the error. My Dockerfile looks like:

FROM A_JFROG_JAR_URL as JAR

LABEL purpose=A Test Container

RUN mkdir -p /opt/tools/tapm

WORKDIR /opt/tools/tapm

COPY --from=JAR /opt/tools/tapm

CMD ["/bin/sh"]

I checked the logs, but it has mostly a bunch of html code. With only one significant line:

We're sorry but jfrog webapp doesn't work properly without JavaScript enabled. Please enable it to continue.

I am running it on Windows. I have Docker Desktop version of 4.44.3. I have WSL installed.

1 Answer 1

2

You are trying to pass HTML instead of base image into FROM instruction. You should pass base image. You can read official Docker documentation about FROM. For example try something like this:

FROM eclipse-temurin:17-jre AS runtime
RUN mkdir -p /opt/tools/tapm
WORKDIR /opt/tools/tapm
ADD "https://your.jfrog/artifactory/path/to/my.jar" app.jar
CMD ["java", "-jar", "app.jar"]
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.