Skip to content

Commit 343cbd1

Browse files
authored
Merge pull request #32 from Fortiphyd/add-git-lfs-check
Add git lfs check
2 parents 417e0d2 + a9f7d7a commit 343cbd1

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ docker compose up -d
140140
### 🏗️ Option B: Clone and build
141141

142142
```bash
143+
sudo apt install -y git git-lfs
143144
git clone https://github.com/Fortiphyd/GRFICSv3.git
144145
cd GRFICSv3
145146
docker compose build

simulation/Dockerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ WORKDIR /build/simulation
1414
RUN make
1515

1616

17-
1817
# ---- Stage 2: Runtime image ----
1918
FROM python:3.11-slim@sha256:7a3ed1226224bcc1fe5443262363d42f48cf832a540c1836ba8ccbeaadf8637c
2019

@@ -41,6 +40,17 @@ COPY ./nginx_config /etc/nginx/sites-enabled/default
4140
RUN chown -R www-data:www-data /var/www/
4241
#RUN chmod +x /var/www/html/data/index.php
4342

43+
RUN set -e; \
44+
echo "Checking for Git LFS pointer files..."; \
45+
if grep -R --binary-files=without-match -n "version https://git-lfs.github.com/spec/v1" /var/www/html/Build 2>/dev/null; then \
46+
echo ""; \
47+
echo "ERROR: Git LFS files not present (pointer files detected)."; \
48+
echo "Install git-lfs, then run: git lfs pull"; \
49+
echo "Then try building again"; \
50+
exit 1; \
51+
fi
52+
53+
4454
# Set working directory
4555
WORKDIR /app
4656

0 commit comments

Comments
 (0)