feat: Update docker-compose and Dockerfile for frontend build configuration
- Added build context and Dockerfile specification for the frontend service in docker-compose.yml. - Refactored Dockerfile.app to ensure non-root user creation is idempotent and streamlined the ownership setup for application directories.
This commit is contained in:
+1
-10
@@ -64,16 +64,7 @@ RUN if [ -n "$APK_MIRROR_ARG" ]; then \
|
||||
|
||||
# Create a non-root user and switch to it
|
||||
RUN mkdir -p /data/files && \
|
||||
adduser -D -g '' appuser && \
|
||||
chown -R appuser:appuser /app /data/files
|
||||
|
||||
# Copy migrate tool from builder stage
|
||||
COPY --from=builder /go/bin/migrate /usr/local/bin/
|
||||
COPY --from=builder /app/yanyiwu/ /go/pkg/mod/github.com/yanyiwu/
|
||||
|
||||
# Create a non-root user and switch to it
|
||||
RUN mkdir -p /data/files && \
|
||||
adduser -D -g '' appuser && \
|
||||
id -u appuser >/dev/null 2>&1 || adduser -D -g '' appuser && \
|
||||
chown -R appuser:appuser /app /data/files
|
||||
|
||||
# Copy migrate tool from builder stage
|
||||
|
||||
Reference in New Issue
Block a user