Skip to content

Commit e243709

Browse files
authored
Merge pull request #3 from Evodim/features/bump-strapi-v5.30
PR - fix entry point not found on windows docker hosting
2 parents 28316d5 + 39b1027 commit e243709

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Ensure shell scripts always use LF line endings (even on Windows)
2+
*.sh text eol=lf
3+
4+
# Ensure Dockerfiles use LF
5+
Dockerfile text eol=lf
6+
docker-entrypoint.sh text eol=lf

image/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ RUN apk update && apk add --no-cache \
3131
&& rm -rf /var/cache/apk/*
3232

3333
# Set up Node.js environment
34-
RUN yarn global add node-gyp && \
34+
RUN yarn global add node-gyp patch-package && \
3535
yarn config set network-timeout 600000 -g
3636

3737
# Create Strapi application directory and initialize
@@ -63,18 +63,18 @@ RUN yarn add \
6363
strapi-provider-upload-azure-storage \
6464
@strapi/utils \
6565
@strapi/plugin-documentation \
66-
@strapi/database
67-
66+
@strapi/database
6867

6968
# Create src directory
7069
RUN mkdir -p src
7170

7271
# Copy assets directory to image (will be copied to destinations at runtime by entrypoint)
7372
COPY assets /srv/app/assets
7473

75-
# Copy entrypoint script
74+
# Copy entrypoint script and fix line endings (convert CRLF to LF for Windows compatibility)
7675
COPY docker-entrypoint.sh /usr/local/bin/
77-
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
76+
RUN sed -i 's/\r$//' /usr/local/bin/docker-entrypoint.sh && \
77+
chmod +x /usr/local/bin/docker-entrypoint.sh
7878

7979
VOLUME /srv/app/src
8080

0 commit comments

Comments
 (0)