FROM python:3.10 | |
# Define a build argument for the timestamp | |
ARG BUILD_TIMESTAMP | |
# Set the environment variable using the build argument | |
ENV BUILD_TIMESTAMP=${BUILD_TIMESTAMP} | |
# Use the timestamp in a command (for demonstration) | |
RUN echo "Build timestamp: ${BUILD_TIMESTAMP}" | |
# 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" |