v0.1.5: Fix ENV syntax in website Dockerfile
This commit is contained in:
@@ -12,7 +12,6 @@ RUN node build-blog.js
|
|||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
COPY --from=version /tmp/version.txt /tmp/version.txt
|
COPY --from=version /tmp/version.txt /tmp/version.txt
|
||||||
ENV VERSION=$(cat /tmp/version.txt)
|
|
||||||
|
|
||||||
COPY --from=builder /app/www/ /usr/share/nginx/html/
|
COPY --from=builder /app/www/ /usr/share/nginx/html/
|
||||||
COPY docker-entrypoint.d/ /docker-entrypoint.d/
|
COPY docker-entrypoint.d/ /docker-entrypoint.d/
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
VERSION=$(cat /tmp/version.txt)
|
||||||
|
export VERSION
|
||||||
|
|
||||||
# Run envsubst on index.html
|
# Run envsubst on index.html
|
||||||
if [ -f /usr/share/nginx/html/index.html ]; then
|
if [ -f /usr/share/nginx/html/index.html ]; then
|
||||||
envsubst < /usr/share/nginx/html/index.html > /usr/share/nginx/html/index.html.tmp
|
envsubst < /usr/share/nginx/html/index.html > /usr/share/nginx/html/index.html.tmp
|
||||||
|
|||||||
Reference in New Issue
Block a user