Skip to content

Commit

Permalink
Merge pull request #171 from legend-exp/docker
Browse files Browse the repository at this point in the history
Fix Dockerfile versioning strategy
  • Loading branch information
gipert authored Nov 29, 2024
2 parents 6ca1257 + d67593d commit 0ac1770
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .dockerhub/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@ WORKDIR /root
RUN mkdir -p src build /opt/remage && \
if [ "${REMAGE_VERSION}" = "dev" ]; then \
rm -rf src && \
git clone "https://github.com/legend-exp/remage" src; \
git clone "https://github.com/legend-exp/remage" src && \
REMAGE_VERSION_SET="$(git -C src describe --tags)"; \
else \
REMAGE_VERSION_SET="${REMAGE_VERSION}" && \
wget -q -O- "https://github.com/legend-exp/remage/archive/${REMAGE_VERSION}.tar.gz" \
| tar --strip-components 1 -C src --strip=1 -x -z; \
fi && \
cd build && \
cmake \
-DCMAKE_INSTALL_PREFIX="/opt/remage" \
-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
-DCMAKE_PROJECT_VERSION="${REMAGE_VERSION_SET}" \
../src && \
make -j"$(nproc)" install && \
if [ "${REMAGE_BASE_FLAVOR}" = "slim" ]; then \
Expand Down

0 comments on commit 0ac1770

Please sign in to comment.