-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile.dev
More file actions
34 lines (29 loc) · 1.52 KB
/
Copy pathDockerfile.dev
File metadata and controls
34 lines (29 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Development/builder image for TokenHub.
# Contains all tools needed for build, test, lint, and docs.
# Used by Makefile targets — no host Go/tools required.
FROM golang:1.24-bookworm
ARG TARGETARCH
RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates curl bash && rm -rf /var/lib/apt/lists/*
ARG MDBOOK_VERSION=0.4.44
RUN case "${TARGETARCH}" in \
amd64) MDBOOK_ARCH="x86_64-unknown-linux-musl" ;; \
arm64) MDBOOK_ARCH="aarch64-unknown-linux-musl" ;; \
*) echo "unsupported arch: ${TARGETARCH}" && exit 1 ;; \
esac && \
curl -sSL --retry 3 --retry-delay 5 --max-time 120 \
"https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-${MDBOOK_ARCH}.tar.gz" \
-o /tmp/mdbook.tar.gz && \
tar xz -C /usr/local/bin -f /tmp/mdbook.tar.gz && rm /tmp/mdbook.tar.gz
ARG GOLANGCI_LINT_VERSION=2.10.1
RUN case "${TARGETARCH}" in \
amd64) LINT_ARCH="amd64" ;; \
arm64) LINT_ARCH="arm64" ;; \
*) echo "unsupported arch: ${TARGETARCH}" && exit 1 ;; \
esac && \
curl -sSL --retry 3 --retry-delay 5 --max-time 120 \
"https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-${LINT_ARCH}.tar.gz" \
-o /tmp/lint.tar.gz && \
tar xz -C /tmp -f /tmp/lint.tar.gz && \
mv /tmp/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-${LINT_ARCH}/golangci-lint /usr/local/bin/ && \
rm -rf /tmp/lint.tar.gz /tmp/golangci-lint-*
WORKDIR /src