mirror of
https://github.com/yacy/yacy_search_server.git
synced 2026-10-25 05:54:15 +00:00
Docker: Fix YaCy version determination
The .dockerignore file was preventing the .git directory from being copied into the context during container builds, which prevented ant from determining the YaCy version by running a few git commands. This fixes containerized YaCy peer's version showing up as: yacy_v1.941_fatal: not a git repository (or any of the parent directories): .gitfatal: not a git repository (or any of the parent directories): .git_fatal: not a git repository (or any of the parent directories): .git
This commit is contained in:
1 parent
ff15bf7083
commit
a5a1f44441
5 files changed
+16
-4
No files matched your search
@@ -1,4 +1,3 @@
|
||||
.git
|
||||
.github
|
||||
DATA*
|
||||
RELEASE
|
||||
|
||||
+4
-1
@@ -20,7 +20,10 @@ RUN for i in 1 2 3; do \
|
||||
# set current working dir & copy sources
|
||||
WORKDIR /opt
|
||||
COPY . /opt/yacy_search_server/
|
||||
RUN ant compile -f /opt/yacy_search_server/build.xml
|
||||
# .git dir deleted here because .git is needed during the build to deterime the version,
|
||||
# but isn't required at runtime
|
||||
RUN ant compile -f /opt/yacy_search_server/build.xml \
|
||||
&& rm -fr /opt/yacy_search_server/.git
|
||||
|
||||
# Set initial admin password: "yacy" (encoded with custom yacy md5 function net.yacy.cora.order.Digest.encodeMD5Hex())
|
||||
RUN sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:8cffbc0d66567a0987a4aba1ec46d63c" /opt/yacy_search_server/defaults/yacy.init && \
|
||||
|
||||
@@ -18,7 +18,10 @@ RUN for i in 1 2 3; do \
|
||||
# compile YaCy
|
||||
WORKDIR /opt
|
||||
COPY . /opt/yacy_search_server/
|
||||
RUN ant compile -f /opt/yacy_search_server/build.xml
|
||||
# .git dir deleted here because .git is needed during the build to deterime the version,
|
||||
# but isn't required at runtime
|
||||
RUN ant compile -f /opt/yacy_search_server/build.xml \
|
||||
&& rm -fr /opt/yacy_search_server/.git
|
||||
|
||||
# Set initial admin password: "yacy" (encoded with custom yacy md5 function net.yacy.cora.order.Digest.encodeMD5Hex())
|
||||
RUN sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:8cffbc0d66567a0987a4aba1ec46d63c" /opt/yacy_search_server/defaults/yacy.init && \
|
||||
|
||||
@@ -16,7 +16,10 @@ RUN apk add --no-cache curl git apache-ant
|
||||
# set current working dir & copy sources
|
||||
WORKDIR /opt
|
||||
COPY . /opt/yacy_search_server/
|
||||
RUN ant compile -f /opt/yacy_search_server/build.xml
|
||||
# .git dir deleted here because .git is needed during the build to deterime the version,
|
||||
# but isn't required at runtime
|
||||
RUN ant compile -f /opt/yacy_search_server/build.xml \
|
||||
&& rm -fr /opt/yacy_search_server/.git
|
||||
|
||||
# Set initial admin password: "yacy" (encoded with custom yacy md5 function net.yacy.cora.order.Digest.encodeMD5Hex())
|
||||
RUN sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:8cffbc0d66567a0987a4aba1ec46d63c" /opt/yacy_search_server/defaults/yacy.init && \
|
||||
|
||||
@@ -18,12 +18,16 @@ RUN apt-get update && apt-get install -yq curl wkhtmltopdf imagemagick xvfb ghos
|
||||
WORKDIR /opt
|
||||
COPY . /opt/yacy_search_server/
|
||||
|
||||
# .git dir deleted here because .git is needed during the build to deterime the version,
|
||||
# but isn't required at runtime
|
||||
RUN ant compile -f /opt/yacy_search_server/build.xml \
|
||||
RUN rm -rf /opt/yacy_search_server/.git && \
|
||||
apt-get update && \
|
||||
apt-get install -yq ant && \
|
||||
ant compile -f /opt/yacy_search_server/build.xml && \
|
||||
apt-get purge -yq --auto-remove ant && \
|
||||
apt-get clean && \
|
||||
rm -fr /opt/yacy_search_server/.git && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set initial admin password: "yacy" (encoded with custom yacy md5 function net.yacy.cora.order.Digest.encodeMD5Hex())
|
||||
|
||||
Reference in new issue
Block a user