fix: docker build version arg

This commit is contained in:
Lakhan Samani 2021-10-10 01:15:47 +05:30
parent 17676fa13b
commit 072cd46809
2 changed files with 5 additions and 5 deletions

View File

@ -71,4 +71,4 @@ jobs:
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
build-args: | build-args: |
"VERSION=${VERSION}" VERSION=${VERSION}

View File

@ -3,13 +3,13 @@ WORKDIR /app
COPY server server COPY server server
COPY Makefile . COPY Makefile .
ARG VERSION ARG VERSION="latest"
ENV VERSION="${VERSION}" ENV VERSION="$VERSION"
RUN echo "$VERSION"
RUN apk add build-base &&\ RUN apk add build-base &&\
make clean && make && \ make clean && make && \
chmod 777 build/server && \ chmod 777 build/server
echo "$VERSION"
FROM alpine:latest FROM alpine:latest
RUN apk --no-cache add ca-certificates RUN apk --no-cache add ca-certificates