FROM python:3.10 RUN apk add --no-cache bash # Get the current timestamp and store it in an environment variable RUN timestamp=$(date +%Y%m%d%H%M%S) && \ echo "Timestamp: $timestamp" && \ echo "export BUILD_TIMESTAMP=$timestamp" >> /etc/profile # Ensure the timestamp is available as an environment variable ENV BUILD_TIMESTAMP=$timestamp # Print the timestamp to verify RUN echo "The build timestamp is $BUILD_TIMESTAMP"