forked from ViktorUJ/cks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_debug_x86
38 lines (33 loc) · 1.55 KB
/
Dockerfile_debug_x86
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
FROM golang:alpine AS builder
RUN apk update && apk add --no-cache git
WORKDIR $GOPATH/src/mypackage/myapp/
COPY app/ .
RUN go mod tidy
RUN go build -ldflags="-w -s" -o app app.go
FROM amazon/aws-cli:2.17.33 AS redis-builder
RUN yum install tar git wget make gcc pkgconfig which -y
RUN wget http://download.redis.io/redis-stable.tar.gz && \
tar xvzf redis-stable.tar.gz && cd redis-stable && \
make -j$(nproc) redis-cli && \
cp src/redis-cli /usr/local/bin/redis-cli
FROM amazon/aws-cli:2.17.33
COPY yum.repos /etc/yum.repos.d/
RUN yum install jq bc mongodb-atlas-cli mongodb-mongosh mysql postgresql nc tar git wget make bind-utils iputils -y && \
curl -LO https://dl.k8s.io/release/v1.31.0/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv kubectl /usr/local/bin/kubectl && \
curl -Lo helm.tar.gz https://get.helm.sh/helm-v3.13.1-linux-amd64.tar.gz && \
tar -zxvf helm.tar.gz && \
rm -rf helm.tar.gz && \
mv linux-amd64/helm /usr/local/bin/helm && \
helm plugin install https://github.com/jkroepke/helm-secrets && \
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 && \
chmod +x skaffold && \
mv skaffold /usr/local/bin/skaffold && \
skaffold version && \
curl -Lo sops https://github.com/getsops/sops/releases/download/v3.8.1/sops-v3.8.1.linux.amd64 && \
chmod +x sops && \
mv sops /usr/local/bin/sops
COPY --from=builder /go/src/mypackage/myapp/app /app
COPY --from=redis-builder /usr/local/bin/redis-cli /usr/local/bin/redis-cli
ENTRYPOINT ["/app"]