add environment variable support

This commit is contained in:
2023-08-03 11:44:26 +02:00
parent ee0cb1fed9
commit e42a0da486
5 changed files with 45 additions and 3 deletions

View File

@@ -1,8 +1,11 @@
# Use Alpine as the base image
FROM golang:alpine
# Install isotope
FROM ugric/isotope:latest
# Set the Current Working Directory inside the container
WORKDIR /app
WORKDIR /argon
# Copy go mod and sum files
COPY go.mod go.sum ./
@@ -11,7 +14,7 @@ COPY go.mod go.sum ./
RUN go mod download
# Copy the source from the current directory to the Working Directory inside the container
COPY . .
COPY ./src ./src
# Build the Go app
RUN go build -trimpath -ldflags="-s -w" -o bin/argon ./src
@@ -20,4 +23,4 @@ RUN go build -trimpath -ldflags="-s -w" -o bin/argon ./src
RUN chmod +x bin/argon
# add the binary to the path
ENV PATH="/app/bin:${PATH}"
ENV PATH="/argon/bin:${PATH}"