-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathalpine.Dockerfile
48 lines (40 loc) · 1.77 KB
/
alpine.Dockerfile
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
ARG NODE_VERSION=XX
FROM truemark/node:${NODE_VERSION}-alpine-3.17 AS node
FROM truemark/aws-cli:alpine-3.17 AS base
COPY --from=truemark/git:alpine-3.17 /usr/local/ /usr/local/
COPY --from=truemark/git-crypt:alpine-3.17 /usr/local/ /usr/local/
COPY --from=node /usr/local /usr/local/
RUN apk add libstdc++ --no-cache && \
npm install -g typescript aws-cdk pnpm yarn esbuild && \
npm config set fund false --location=global
FROM base AS dotnet6
RUN apk add --no-cache icu-libs && \
curl -fsSL https://dot.net/v1/dotnet-install.sh | bash -s -- -c 6.0 && \
ln -s /root/.dotnet/dotnet /usr/local/bin/dotnet && \
dotnet tool install -g Amazon.Lambda.Tools
ENV DOTNET_ROOT="/root/.dotnet"
ENV PATH="/root/.dotnet:${PATH}"
FROM dotnet6 AS dotnet6-jre-17
RUN apk add --no-cache openjdk17-jre-headless
FROM base AS dotnet7
RUN apk add --no-cache icu-libs && \
curl -fsSL https://dot.net/v1/dotnet-install.sh | bash -s -- -c 7.0 && \
ln -s /root/.dotnet/dotnet /usr/local/bin/dotnet && \
dotnet tool install -g Amazon.Lambda.Tools
ENV DOTNET_ROOT="/root/.dotnet"
ENV PATH="/root/.dotnet:${PATH}"
FROM dotnet7 AS dotnet7-jre-17
RUN apk add --no-cache openjdk17-jre-headless
FROM base AS dotnet8
RUN apk add --no-cache icu-libs && \
curl -fsSL https://dot.net/v1/dotnet-install.sh | bash -s -- -c 8.0 && \
ln -s /root/.dotnet/dotnet /usr/local/bin/dotnet && \
dotnet tool install -g Amazon.Lambda.Tools
ENV DOTNET_ROOT="/root/.dotnet"
ENV PATH="/root/.dotnet:${PATH}"
FROM dotnet8 AS dotnet8-jre-21
RUN apk add --no-cache openjdk21-jre-headless
FROM base AS go
ARG TARGETARCH
RUN curl -fsSL https://golang.org/dl/$(curl -fsSL "https://go.dev/VERSION?m=text" | head -n 1).linux-${TARGETARCH}.tar.gz | tar -C /usr/local -xz && \
ln -s /usr/local/go/bin/go /usr/local/bin/go