Skip to content

Commit

Permalink
Refactor build configuration and Dockerfile for Platypus web app admi…
Browse files Browse the repository at this point in the history
…n, agent, and server
  • Loading branch information
WangYihang committed Oct 2, 2024
1 parent 9789cb7 commit d5381fa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cmd/admin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ RUN if git describe --tags --exact-match >/dev/null 2>&1; then \
goreleaser build --id platypus-admin --clean --snapshot; \
fi

RUN cp dist/platypus-admin_${TARGETOS}_${TARGETARCH}_v1/platypus-admin /usr/local/bin/platypus-admin

FROM alpine:3.12
RUN apk add --no-cache ca-certificates
COPY --from=builder /app/dist/platypus-admin_${TARGETOS}_${TARGETARCH}_v1/platypus-admin /usr/local/bin/platypus-admin
COPY --from=builder /usr/local/bin/platypus-admin /usr/local/bin/platypus-admin
ENTRYPOINT [ "/usr/local/bin/platypus-admin" ]
4 changes: 3 additions & 1 deletion cmd/agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ RUN if git describe --tags --exact-match >/dev/null 2>&1; then \
goreleaser build --id platypus-agent --clean --snapshot; \
fi

RUN cp dist/platypus-agent_${TARGETOS}_${TARGETARCH}_v1/platypus-agent /usr/local/bin/platypus-agent

FROM alpine:3.12
RUN apk add --no-cache ca-certificates
COPY --from=builder /app/dist/platypus-agent_${TARGETOS}_${TARGETARCH}_v1/platypus-agent /usr/local/bin/platypus-agent
COPY --from=builder /usr/local/bin/platypus-agent /usr/local/bin/platypus-agent
ENTRYPOINT [ "/usr/local/bin/platypus-agent" ]
4 changes: 3 additions & 1 deletion cmd/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ RUN if git describe --tags --exact-match >/dev/null 2>&1; then \
goreleaser build --id platypus-server --clean --snapshot; \
fi

RUN cp dist/platypus-server_${TARGETOS}_${TARGETARCH}_v1/platypus-server /usr/local/bin/platypus-server

FROM alpine:3.12
RUN apk add --no-cache ca-certificates
COPY --from=builder /app/dist/platypus-server_${TARGETOS}_${TARGETARCH}_v1/platypus-server /usr/local/bin/platypus-server
COPY --from=builder /usr/local/bin/platypus-server /usr/local/bin/platypus-server
ENTRYPOINT [ "/usr/local/bin/platypus-server" ]

0 comments on commit d5381fa

Please sign in to comment.