Add entrypoint script to create .env from Docker environment variables
This commit is contained in:
@@ -23,6 +23,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
&& curl -o /usr/local/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
|
||||
&& chmod +x /usr/local/bin/wp
|
||||
|
||||
# Copy entrypoint script
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
# Copy application
|
||||
USER www-data
|
||||
WORKDIR /var/www/html
|
||||
@@ -36,3 +40,6 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
|
||||
CMD curl -fsS http://localhost/ -o /dev/null || exit 1
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
CMD ["/init"]
|
||||
|
||||
Reference in New Issue
Block a user