Skip to content

Commit cf47565

Browse files
committed
feat: add version number to docker image
1 parent 90a15ce commit cf47565

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/build-and-push-images.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,6 @@ jobs:
6161
file: ./docker/Dockerfile
6262
push: true
6363
tags: ${{ steps.extract-version.outputs.tags }}
64+
build-args: |
65+
VERSION=${{ github.ref_name }}
6466

docker/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ FROM php:8.3-fpm-alpine
4444
# Set the working directory
4545
WORKDIR /var/app
4646

47+
ARG VERSION=dev
48+
ENV VERSION=$VERSION
49+
4750
# Copy necessary files from the builder stage
4851
COPY --from=builder /var/app /var/app
4952
COPY --from=builder /usr/local/etc/php/conf.d /usr/local/etc/php/conf.d

docker/entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ cd /var/app
44

55
# Starting Investbrain
66
echo "CuKWhOKWliAgICAgICAg4paXIOKWjCAgICAg4paYICAK4paQIOKWm+KWjOKWjOKWjOKWiOKWjOKWm+KWmOKWnOKWmOKWm+KWjOKWm+KWmOKWgOKWjOKWjOKWm+KWjArilp/ilpbilozilozilprilpjilpnilpbiloTilozilpDilpbilpnilozilowg4paI4paM4paM4paM4paMCg==" | base64 -d
7+
printf "%15s$VERSION\n"
78

89
echo -e "\n====================== Validating environment... ====================== "
910

0 commit comments

Comments
 (0)