-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
75 lines (62 loc) · 2.67 KB
/
Dockerfile
File metadata and controls
75 lines (62 loc) · 2.67 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
FROM node:24.13.0-slim
ENV DEBIAN_FRONTEND noninteractive
ENV PNPM_VERSION 10.28.1
ENV TURBO_VERSION 2.7.5
ENV TSX_VERSION 4.19.4
ENV TS_NODE 10.9.2
ENV SWC_CORE 1.15.10
ENV AWS_CLI 2.27.19
ENV BUILDKIT_VERSION 0.26.3
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
software-properties-common \
ca-certificates \
build-essential \
wget \
jq \
patch \
python3 \
curl \
unzip \
git \
skopeo \
&& apt-get clean
# copy script for building and publishing container images
COPY script /script
# install awscli v2. see https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${AWS_CLI}.zip" -o /tmp/awscliv2.zip \
&& unzip /tmp/awscliv2.zip -d /tmp/ \
&& /tmp/aws/install \
&& rm /tmp/awscliv2.zip \
&& rm -rf /tmp/aws
# install node packages
RUN npm i -g pnpm@${PNPM_VERSION} turbo@${TURBO_VERSION} tsx@${TSX_VERSION} ts-node@${TS_NODE} @swc/core@${SWC_CORE}
RUN curl -L "https://github.com/moby/buildkit/releases/download/v${BUILDKIT_VERSION}/buildkit-v${BUILDKIT_VERSION}.linux-amd64.tar.gz" -o /tmp/buildkit.tar.gz \
&& mkdir -p /tmp/buildkit \
&& tar -C /tmp/buildkit -xzf /tmp/buildkit.tar.gz \
&& mv /tmp/buildkit/bin/buildctl /usr/bin/buildctl \
&& chmod a+x /usr/bin/buildctl \
&& rm -rf /tmp/buildkit \
&& rm /tmp/buildkit.tar.gz
# install kubectl
RUN curl -L "https://dl.k8s.io/release/v1.30.13/bin/linux/amd64/kubectl" -o "/usr/bin/kubectl-v1.30" \
&& curl -L "https://dl.k8s.io/release/v1.31.9/bin/linux/amd64/kubectl" -o "/usr/bin/kubectl-v1.31" \
&& curl -L "https://dl.k8s.io/release/v1.32.5/bin/linux/amd64/kubectl" -o "/usr/bin/kubectl-v1.32" \
&& chmod a+x /usr/bin/kubectl*
RUN ln -s /usr/bin/kubectl-v1.32 /usr/bin/kubectl
# install golang
COPY --from=golang:1.25.6 /usr/local/go/ /usr/local/go/
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:/usr/bin:${PATH}
# install amazon-ecr-credential-helper
RUN curl -L "https://amazon-ecr-credential-helper-releases.s3.us-east-2.amazonaws.com/0.11.0/linux-amd64/docker-credential-ecr-login" -o "/usr/bin/docker-credential-ecr-login" \
&& chmod a+x /usr/bin/docker-credential-ecr-login
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
# install uv
# https://docs.astral.sh/uv/reference/installer/#unmanaged-installations
RUN curl -LsSf https://astral.sh/uv/install.sh | env UV_UNMANAGED_INSTALL="/usr/bin" sh
# install rust via rustup
# https://www.rust-lang.org/tools/install
ENV RUST_VERSION 1.92.0
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${RUST_VERSION} --profile default \
&& ln -s /root/.cargo/bin/* /usr/bin/