Help with the script to generate a docker image

Turbovixa year ago

Guys, can anyone instruct me how I can modify the script, so instead of downloading the zip from the official repository, I use the zip that I built locally?, that is, not using "wget" but the local package.

FROM openjdk:11-jre-slim-bullseye

ENV TRACCAR_VERSION 5.10

WORKDIR /opt/traccar

RUN set -ex && \
    apt-get update &&\
    TERM=xterm DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends unzip wget && \
    wget -qO /tmp/traccar.zip https://github.com/traccar/traccar/releases/download/v$TRACCAR_VERSION/traccar-other-$TRACCAR_VERSION.zip && \
    unzip -qo /tmp/traccar.zip -d /opt/traccar && \
    apt-get autoremove --yes unzip wget && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* /tmp/*

ENTRYPOINT ["java", "-Xms1g", "-Xmx1g", "-Djava.net.preferIPv4Stack=true"]

CMD ["-jar", "tracker-server.jar", "conf/traccar.xml"]
Turbovixa year ago

I tried all day to understand this, and after taking a cold shower and eating something, I was able to see where I was going wrong.
Now it worked!

FROM openjdk:11-jre-slim-bullseye

ENV TRACCAR_VERSION 5.10

WORKDIR /opt/traccar

COPY traccar.zip /tmp

RUN set -ex && \
    apt-get update &&\
    TERM=xterm DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends unzip wget && \
    unzip -qo /tmp/traccar.zip -d /opt/traccar && \
    apt-get autoremove --yes unzip wget && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* /tmp/*

ENTRYPOINT ["java", "-Xms1g", "-Xmx1g", "-Djava.net.preferIPv4Stack=true"]

CMD ["-jar", "tracker-server.jar", "conf/traccar.xml"]