blob: 9a7df43fdf40ffa0d26954686dd7030b2283ae3d [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
garciadeblas70461c52024-07-03 09:17:56 +020016
17# Ensure compatibility with any script
18RUN ln -s /usr/local/bin/bash /bin/bash
19
20# Install packages available at Alpine repos
21RUN apk add --no-cache \
22 age \
23 bash \
24 curl \
25 envsubst \
26 git \
27 kubectl \
28 kustomize \
29 rsync \
30 sops \
31 yq
garciadeblas70461c52024-07-03 09:17:56 +020032
33# Install other dependencies
34RUN (curl -s https://fluxcd.io/install.sh | bash) && \
35 curl https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.44/kpt_linux_amd64 -Lo kpt && \
36 chmod +x kpt && \
37 mv kpt /usr/local/bin/
38
39# Create new user and log in as it
40RUN addgroup -g 10000 -S app && \
41 adduser -h /app -s /bin/false -D -u 10000 -S -G app app
42USER app
43WORKDIR /app
44
45# Add helper scripts
46COPY --chown=app:app scripts/docker-entrypoint.sh /app/scripts/entrypoint.sh
47COPY --chown=app:app scripts/library /app/scripts/library
48
49ENTRYPOINT [ "/app/scripts/entrypoint.sh" ]
50
51CMD ["bash"]