Skip to content
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
20 changes: 0 additions & 20 deletions build/Dockerfile

This file was deleted.

46 changes: 46 additions & 0 deletions build/Dockerfile.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# ⚠️ IMPORTANT: This Dockerfile is for REFERENCE ONLY and is NOT production-ready.
#
# We do NOT recommend using this Dockerfile in production. Instead, use the official
# hookdeck/outpost image from Docker Hub:
# docker pull hookdeck/outpost:latest
#
# The official image is optimized, regularly updated, and fully supported.
#
# This example is provided for educational purposes and as a starting point for
# custom builds. If you need help with custom deployments, please create a
# discussion at: https://github.com/hookdeck/outpost/discussions

# Stage 0
# Build the binaries
FROM golang:1.23-alpine
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .

# Build all binaries
RUN go build -o ./bin/outpost ./cmd/outpost/main.go && \
go build -o ./bin/outpost-server ./cmd/outpost-server/main.go && \
go build -o ./bin/outpost-migrate-redis ./cmd/outpost-migrate-redis/main.go

# Stage 1
# Get busybox shell for entrypoint script
FROM busybox:1.36-musl AS busybox

# Stage 2
# Copy binaries to a new image
FROM gcr.io/distroless/base-debian12:nonroot

# Copy statically linked shell from busybox for entrypoint script
COPY --from=busybox /bin/sh /bin/sh

# Copy all binaries
COPY --from=0 /app/bin/outpost /usr/local/bin/outpost
COPY --from=0 /app/bin/outpost-server /usr/local/bin/outpost-server
COPY --from=0 /app/bin/outpost-migrate-redis /usr/local/bin/outpost-migrate-redis

# Copy entrypoint script
COPY --from=0 /app/build/entrypoint.sh /usr/local/bin/entrypoint.sh
Copy link

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The entrypoint script is copied but there's no verification that it exists or is executable. Consider adding a RUN command to make it executable: RUN chmod +x /usr/local/bin/entrypoint.sh

Suggested change
COPY --from=0 /app/build/entrypoint.sh /usr/local/bin/entrypoint.sh
COPY --from=0 /app/build/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh

Copilot uses AI. Check for mistakes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think this is necessary because we're already executing sh entrypoint.sh as a shell script; with that in mind, given this is an example Dockerfile, we can iterate on this later if necessary but let's let the users share their input with us if this is a problem.


# Default entrypoint runs migrations and starts server
ENTRYPOINT ["/bin/sh", "/usr/local/bin/entrypoint.sh"]
Loading