Skip to content

Commit

Permalink
set ANONADDY_VERSION env var (#157)
Browse files Browse the repository at this point in the history
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max and crazy-max authored Jul 30, 2022
1 parent 3ed7053 commit c78c50d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1

ARG ANONADDY_VERSION=0.12.3

FROM crazymax/yasu:latest AS yasu
Expand Down Expand Up @@ -68,13 +70,14 @@ RUN apk --no-cache add \
&& apk del build-dependencies \
&& rm -rf /tmp/* /var/www/*

ENV S6_BEHAVIOUR_IF_STAGE2_FAILS="2" \
ARG ANONADDY_VERSION
ENV ANONADDY_VERSION=$ANONADDY_VERSION \
S6_BEHAVIOUR_IF_STAGE2_FAILS="2" \
SOCKLOG_TIMESTAMP_FORMAT="" \
TZ="UTC" \
PUID="1000" \
PGID="1000"

ARG ANONADDY_VERSION
WORKDIR /var/www/anonaddy
RUN apk --no-cache add -t build-dependencies \
git \
Expand All @@ -87,7 +90,8 @@ RUN apk --no-cache add -t build-dependencies \
&& addgroup anonaddy mail \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer \
&& git config --global --add safe.directory /var/www/anonaddy \
&& git clone --branch v${ANONADDY_VERSION} https://github.com/anonaddy/anonaddy . \
&& git init . && git remote add origin "https://github.com/anonaddy/anonaddy.git" \
&& git fetch --depth 1 origin "v${ANONADDY_VERSION}" && git checkout -q FETCH_HEAD \
&& composer install --optimize-autoloader --no-dev --no-interaction --no-ansi \
&& npm config set unsafe-perm true \
&& chown -R anonaddy. /var/www/anonaddy \
Expand Down

0 comments on commit c78c50d

Please sign in to comment.