blob: ca7c90f452223c5924572f3b0595e2b67ef06cde [file] [log] [blame]
garciadeblas70461c52024-07-03 09:17:56 +02001#
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13#
14
15FROM alpine:3.20
16# FROM bash:3.1.23-alpine3.20
17
18# Ensure compatibility with any script
19RUN ln -s /usr/local/bin/bash /bin/bash
20
21# Install packages available at Alpine repos
22RUN apk add --no-cache \
23 age \
24 bash \
25 curl \
26 envsubst \
27 git \
28 kubectl \
29 kustomize \
30 rsync \
31 sops \
32 yq
33#\
34# apg \
35# gnupg \
36# gpg \
37# openssh-client \
38# sshpass
39
40# Install other dependencies
41RUN (curl -s https://fluxcd.io/install.sh | bash) && \
42 curl https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.44/kpt_linux_amd64 -Lo kpt && \
43 chmod +x kpt && \
44 mv kpt /usr/local/bin/
45
46# Create new user and log in as it
47RUN addgroup -g 10000 -S app && \
48 adduser -h /app -s /bin/false -D -u 10000 -S -G app app
49USER app
50WORKDIR /app
51
52# Add helper scripts
53COPY --chown=app:app scripts/docker-entrypoint.sh /app/scripts/entrypoint.sh
54COPY --chown=app:app scripts/library /app/scripts/library
55
56ENTRYPOINT [ "/app/scripts/entrypoint.sh" ]
57
58CMD ["bash"]