8000 adding dockerfile by shanehughes1990 · Pull Request #88 · andybalholm/redwood · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

adding dockerfile #88

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Alpine version for the runner contianer
ARG ALPINE_VERSION=latest

# golang builder image
FROM golang:1.21-bullseye AS builder
WORKDIR /build
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -buildvcs=false -pgo=auto -ldflags="-w -s -X 'main.Version=$(git describe --tags)'" -o app . \
&& git clone https://github.com/andybalholm/redwood-config.git /tmp/redwood-config

# Final runner image
FROM alpine:${ALPINE_VERSION} AS runner

# Copy in config & app binary
COPY --from=builder /build/app /app
COPY --from=builder /tmp/redwood-config /etc/redwood
RUN mkdir -p /var/log/redwood

# Expose the default ports from redwood-config
EXPOSE 6502 6510

# Run the app
ENTRYPOINT [ "/app" ]
0