mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-03-03 02:27:00 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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
0
entrypoint.sh
Normal file
Reference in New Issue
Block a user