Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't override Dockerfile entrypoint with uptermd-fly #263

Merged
merged 2 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
pull: true
file: Dockerfile.uptermd
tags: ${{ steps.meta.outputs.tags }}
platforms: amd64,arm64
labels: ${{ steps.meta.outputs.labels }}
cache-from: |
type=gha
Expand Down
21 changes: 10 additions & 11 deletions Dockerfile.uptermd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ RUN --mount=target=. \
GOOS=$TARGETOS GOARCH=$TARGETARCH go install \
./cmd/...

# For fly deployment only
FROM gcr.io/distroless/static as uptermd-fly

USER nonroot:nonroot

WORKDIR /app
ENV PATH="/app:${PATH}"

COPY --from=builder /go/bin/uptermd /go/bin/uptermd-fly /app/

FROM gcr.io/distroless/static

USER nonroot:nonroot
Expand All @@ -29,14 +39,3 @@ EXPOSE 8080
EXPOSE 9090

ENTRYPOINT ["uptermd"]

FROM gcr.io/distroless/static as uptermd-fly

USER nonroot:nonroot

WORKDIR /app
ENV PATH="/app:${PATH}"

COPY --from=builder /go/bin/uptermd /go/bin/uptermd-fly /app/

ENTRYPOINT ["uptermd-fly"]
3 changes: 3 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ kill_timeout = "5s"
dockerfile = "Dockerfile.uptermd"
build-target = "uptermd-fly"

[experimental]
entrypoint = ["uptermd-fly"]

[[services]]
protocol = "tcp"
internal_port = 2222
Expand Down