-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (34 loc) · 1.64 KB
/
Dockerfile
File metadata and controls
46 lines (34 loc) · 1.64 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
45
46
FROM docker.io/library/almalinux:10 AS base
ARG BUILD_DATE
ARG BUILD_VERSION
LABEL maintainer="contato@cod3rocket.com"
LABEL org.opencontainers.image.created=$BUILD_DATE
LABEL org.opencontainers.image.authors="Cod3Rocket"
LABEL org.opencontainers.image.url="https://github.com/cod3rocket/pre-commit-hooks"
LABEL org.opencontainers.image.documentation="https://github.com/cod3rocket/pre-commit-hooks"
LABEL org.opencontainers.image.source="https://github.com/cod3rocket/pre-commit-hooks"
LABEL org.opencontainers.image.version=$BUILD_VERSION
LABEL org.opencontainers.image.vendor="Cod3Rocket"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.title="pre-commit-hooks"
LABEL org.opencontainers.image.description="Hooks de pre commit da cod3Rocket"
LABEL org.opencontainers.image.base.name="docker.io/library/almalinux:10"
ENV USER=cod3rocket
ENV HOME=/home/$USER
ENV PATH="$PATH:$HOME/.local/bin:$HOME/.local/share/mise/shims"
RUN dnf install -y curl ca-certificates tar freetype dejavu-sans-fonts fontconfig git \
&& dnf clean all \
&& rm -rf /var/cache/yum \
&& useradd -m -s /bin/bash $USER
USER $USER
WORKDIR $HOME
RUN curl https://mise.run | sh \
&& mise settings set experimental true \
&& echo "eval \"\$(~/.local/bin/mise activate bash)\"" >> ~/.bashrc \
&& eval "$(~/.local/bin/mise activate bash)"
COPY mise.toml /etc/mise/config.toml
RUN mise trust && mise install --yes && mise reshim
COPY --chown=$USER:$USER package.json bun.lock main.ts entrypoint.sh /opt/cod3rocket/pre-commit-hooks/
WORKDIR /opt/cod3rocket/pre-commit-hooks
RUN bun i
ENTRYPOINT [ "/opt/cod3rocket/pre-commit-hooks/entrypoint.sh" ]