File tree Expand file tree Collapse file tree 2 files changed +9
-12
lines changed
Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,14 @@ jobs:
3737 id : login-ecr
3838 uses : aws-actions/amazon-ecr-login@v2
3939
40+ - name : Set up Docker Buildx
41+ uses : docker/setup-buildx-action@v3
42+
4043 - name : Build Docker image
4144 run : |
4245 IMAGE_URI=${ECR_REGISTRY}/${ECR_REPOSITORY}:${IMAGE_TAG}
43- echo "Building ${IMAGE_URI}"
44- docker build -f backend/Dockerfile -t ${IMAGE_URI} backend
46+ echo "Building ${IMAGE_URI} for ARM64 "
47+ docker buildx build --platform linux/arm64 - f backend/Dockerfile -t ${IMAGE_URI} --load backend
4548
4649 - name : Push Docker image
4750 run : |
Original file line number Diff line number Diff line change 11# Use official Python runtime as base image
2- # Use ARM64 architecture (native for M4 Mac Mini)
3- FROM --platform=linux/arm64 python:3.11-slim
2+ FROM python:3.11-slim
43
54# Set environment variables
65ENV PYTHONUNBUFFERED=1 \
@@ -21,16 +20,11 @@ RUN pip install -r requirements.txt
2120COPY . .
2221
2322# Copy and set up entrypoint script
24- COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
25- RUN chmod +x /usr/local/bin/docker-entrypoint.sh && \
26- # Ensure Unix line endings and verify the script
27- sed -i 's/\r $//' /usr/local/bin/docker-entrypoint.sh && \
28- ls -la /usr/local/bin/docker-entrypoint.sh && \
29- head -1 /usr/local/bin/docker-entrypoint.sh
23+ COPY docker-entrypoint.sh /usr/local/bin/
24+ RUN chmod +x /usr/local/bin/docker-entrypoint.sh
3025
3126# Expose port
3227EXPOSE 3000
3328
3429# Use entrypoint script
35- ENTRYPOINT ["docker-entrypoint.sh" ]
36-
30+ ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh" ]
You can’t perform that action at this time.
0 commit comments