Update Dockerfile
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
FROM python:3.10
|
| 2 |
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
| 6 |
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
#
|
| 9 |
-
RUN
|
| 10 |
-
echo "Timestamp: $timestamp" && \
|
| 11 |
-
echo "export BUILD_TIMESTAMP=$timestamp" >> /etc/profile
|
| 12 |
|
| 13 |
# Ensure the timestamp is available as an environment variable
|
| 14 |
ENV BUILD_TIMESTAMP=$timestamp
|
|
|
|
| 1 |
FROM python:3.10
|
| 2 |
|
| 3 |
|
| 4 |
+
# Define a build argument for the timestamp
|
| 5 |
+
ARG BUILD_TIMESTAMP
|
| 6 |
|
| 7 |
+
# Set the environment variable using the build argument
|
| 8 |
+
ENV BUILD_TIMESTAMP=${BUILD_TIMESTAMP}
|
| 9 |
|
| 10 |
+
# Use the timestamp in a command (for demonstration)
|
| 11 |
+
RUN echo "Build timestamp: ${BUILD_TIMESTAMP}"
|
|
|
|
|
|
|
| 12 |
|
| 13 |
# Ensure the timestamp is available as an environment variable
|
| 14 |
ENV BUILD_TIMESTAMP=$timestamp
|