Skip to content

Commit

Permalink
修改dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry committed Aug 1, 2024
1 parent d7067d2 commit d20bb74
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@ WORKDIR /app
COPY front/package*.json ./
RUN npm install
COPY front/. .
RUN ls -l /app/
RUN npm run generate
COPY front/replace_underscore.sh ./
RUN ls -l /app/.output/public/_nuxt
RUN chmod +x /app/replace_underscore.sh
RUN apk add --no-cache dos2unix && dos2unix /app/replace_underscore.sh
RUN /app/replace_underscore.sh
RUN ls -l /app/.output/public/_nuxt

FROM golang:1.22.5-alpine as backend
ENV CGO_ENABLED 1
Expand Down
2 changes: 1 addition & 1 deletion front/replace_underscore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ find "$TARGET_DIR" -type f -name '_*' | while read -r file; do
fi

# 更新所有引用到这个文件的地方
find "$dir" -type f -exec sed -i "s|$file|$dir/$new_file|g" {} +
find "$dir" -type f -exec sed -i "s|$base_file|$new_file|g" {} +
else
echo "File $file does not start with an underscore, skipping."
fi
Expand Down

0 comments on commit d20bb74

Please sign in to comment.