FROM public.ecr.aws/docker/library/alpine:3.18.3
ENV USER_NAME <USER NAME>
ENV USER_UID <UID NUMBER>
ENV GROUP_NAME <GROUP NAME>
ENV GROUP_GID <GID NUMBER>
ENV WORKDIR <WORKDIR PATH>
WORKDIR $WORKDIR
RUN apk add --no-cache tini=~0.19.0 && \
addgroup -g $GROUP_GID $GROUP_NAME && \
adduser -D -u $USER_UID -G $GROUP_NAME $USER_NAME && \
chown -R $USER_NAME:$GROUP_NAME .
# RUN apk add --no-cache curl=~8.2.1 && \
# curl --version
USER $USER_NAME
# COPY [--chown=<user>:<group>] [--chmod=<permission (ex. 755)>] <src> <dest> # with Docker Buildkit
# RUN ...
ENTRYPOINT [ "/sbin/tini", "--", "<APPLICATION>" ]