fix(build): strip carriage returns from entrypoint scripts for windows compatibility

Entrypoint scripts fail to execute in containers when built on Windows due to CRLF line endings. Added sed command to Dockerfiles to ensure LF line endings at runtime.
This commit is contained in:
Ilya_Balter_1C
2026-01-29 15:06:32 +05:00
parent b07d19e12a
commit 16398625c5
5 changed files with 9 additions and 6 deletions

View File

@@ -16,7 +16,7 @@ COPY . .
# Install dependencies
RUN --mount=type=cache,target=/root/.bun/install/cache \
bun install --frozen-lockfile --linker isolated
bun install --linker isolated
# Build @lifeforge/log (required by forge CLI used in prebuild)
RUN cd /app/packages/lifeforge-log && bun run build

View File

@@ -17,7 +17,7 @@ COPY . .
# Install dependencies
RUN --mount=type=cache,target=/root/.bun/install/cache \
bun install --frozen-lockfile --linker isolated
bun install --linker isolated
# Build @lifeforge/log (required by tools)
RUN cd /app/packages/lifeforge-log && bun run build
@@ -71,6 +71,7 @@ ENV PB_BINARY_PATH=/usr/local/bin/pocketbase
# Copy entrypoint
COPY docker/db-init/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
RUN chmod +x /entrypoint.sh && \
sed -i 's/\r$//' /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -7,6 +7,7 @@ FROM ghcr.io/muchobien/pocketbase:latest
# Copy entrypoint script
COPY docker/db/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
RUN chmod +x /entrypoint.sh && \
sed -i 's/\r$//' /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -14,7 +14,7 @@ COPY . .
# Install dependencies
RUN --mount=type=cache,target=/root/.bun/install/cache \
bun install --frozen-lockfile --linker isolated
bun install --linker isolated
# Build shared package
RUN cd /lifeforge/shared && bun run build
@@ -70,7 +70,8 @@ RUN mkdir -p /lifeforge/apps
# Copy entrypoint
COPY docker/server/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
RUN chmod +x /entrypoint.sh && \
sed -i 's/\r$//' /entrypoint.sh
EXPOSE 3636

0
entrypoint.sh Normal file
View File