mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Updated docker image build so that it sets shlink's version
This commit is contained in:
parent
65d1301195
commit
924383ccc8
@ -21,3 +21,4 @@ phpstan.neon
|
|||||||
**/test*
|
**/test*
|
||||||
build*
|
build*
|
||||||
.github
|
.github
|
||||||
|
hooks
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
|||||||
.idea
|
.idea
|
||||||
build
|
build
|
||||||
|
!hooks/build
|
||||||
composer.lock
|
composer.lock
|
||||||
composer.phar
|
composer.phar
|
||||||
vendor/
|
vendor/
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
FROM php:7.3.8-cli-alpine3.10
|
FROM php:7.3.8-cli-alpine3.10
|
||||||
LABEL maintainer="Alejandro Celaya <alejandro@alejandrocelaya.com>"
|
LABEL maintainer="Alejandro Celaya <alejandro@alejandrocelaya.com>"
|
||||||
|
|
||||||
|
ARG SHLINK_VERSION=1.18.1
|
||||||
|
ENV SHLINK_VERSION ${SHLINK_VERSION}
|
||||||
ENV SWOOLE_VERSION 4.3.3
|
ENV SWOOLE_VERSION 4.3.3
|
||||||
ENV COMPOSER_VERSION 1.9.0
|
ENV COMPOSER_VERSION 1.9.0
|
||||||
|
|
||||||
@ -39,6 +41,7 @@ RUN rm -rf ./docker && \
|
|||||||
|
|
||||||
# Add shlink to the path to ease running it after container is created
|
# Add shlink to the path to ease running it after container is created
|
||||||
RUN ln -s /etc/shlink/bin/cli /usr/local/bin/shlink
|
RUN ln -s /etc/shlink/bin/cli /usr/local/bin/shlink
|
||||||
|
RUN sed -i "s/%SHLINK_VERSION%/${SHLINK_VERSION}/g" config/autoload/app_options.global.php
|
||||||
|
|
||||||
# Expose swoole port
|
# Expose swoole port
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
10
hooks/build
Executable file
10
hooks/build
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
if [[ ${SOURCE_BRANCH} == 'master' ]]; then
|
||||||
|
SHLINK_RELEASE='latest'
|
||||||
|
else
|
||||||
|
SHLINK_RELEASE=${SOURCE_BRANCH}
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker build --build-arg SHLINK_VERSION=${SHLINK_RELEASE#?} -t ${IMAGE_NAME} .
|
Loading…
Reference in New Issue
Block a user