-
-
Notifications
You must be signed in to change notification settings - Fork 494
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·44 lines (40 loc) · 1.79 KB
/
Dockerfile
File metadata and controls
executable file
·44 lines (40 loc) · 1.79 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
#
# SPDX-License-Identifier: AGPL-3.0-only
#
# Copyright (c) 2025 sycured
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
FROM golang:1.24.4-alpine3.21@sha256:56a23791af0f77c87b049230ead03bd8c3ad41683415ea4595e84ce7eada121a
ARG GOLANGCILINT_VERSION=2.1.5
ARG VEGETA_VERSION=12.12.0
ENV CGO_ENABLED=1
ENV GO111MODULE=on
RUN addgroup -g 1000 nonroot \
&& adduser -u 1000 -G nonroot -D nonroot \
&& apk add --no-cache \
bash=5.2.37-r0 \
build-base=0.5-r3 \
ca-certificates=20241121-r1 \
curl=8.12.1-r1 \
git=2.47.2-r0 \
pkgconf=2.3.0-r0 \
vips-dev=8.15.3-r5 \
&& curl --proto "=https" --tlsv1.2 -fsSL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "${GOPATH}/bin" v${GOLANGCILINT_VERSION} \
&& cpuarch=$(uname -m) \
&& [[ $cpuarch == x86_64 ]] && vegeta_arch=amd64 || vegeta_arch=arm \
&& curl --proto "=https" --tlsv1.2 -fsSLO https://github.com/tsenart/vegeta/releases/download/v${VEGETA_VERSION}/vegeta_${VEGETA_VERSION}_linux_${vegeta_arch}.tar.gz \
&& tar xf vegeta_${VEGETA_VERSION}_linux_${vegeta_arch}.tar.gz \
&& install -oroot -groot vegeta /usr/local/bin/vegeta \
&& rm vegeta_${VEGETA_VERSION}_linux_${vegeta_arch}.tar.gz
WORKDIR /workspace