Skip to content

Commit

Permalink
fix(docker): timezone in docker image
Browse files Browse the repository at this point in the history
To override simply pass TZ=Americas/Toronto at Runtime
  • Loading branch information
serafdev committed Oct 9, 2023
1 parent 67ae197 commit 1458932
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
file: ./build/docker/Dockerfile
file: Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.release.outputs.version }}
labels: ${{ steps.meta.outputs.labels }}
4 changes: 3 additions & 1 deletion build/docker/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ FROM golang:1.20.4 as build-stage

WORKDIR /app

COPY . .
COPY build/docker .

RUN CGO_ENABLED=0 GOOS=linux go build -o /monolith ./cmd/monolith/main.go
RUN CGO_ENABLED=0 GOOS=linux go build -o /yt-upload-v2 ./cmd/yt-upload-v2/main.go

FROM gcr.io/distroless/base-debian11 AS build-release-stage

ENV TZ=America/Montreal

WORKDIR /

COPY --from=build-stage /monolith /monolith
Expand Down

0 comments on commit 1458932

Please sign in to comment.