mirror of
https://github.com/Bhupesh-V/ugit.git
synced 2026-09-10 07:26:20 -04:00
dockerfile attempts v2
This commit is contained in:
parent
32b191786d
commit
b04f696587
37
Dockerfile-a2
Normal file
37
Dockerfile-a2
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# First stage: Install packages
|
||||
FROM alpine:3.18 as builder
|
||||
|
||||
RUN apk add --no-cache \
|
||||
bash \
|
||||
gawk \
|
||||
findutils \
|
||||
coreutils \
|
||||
git \
|
||||
ncurses \
|
||||
fzf
|
||||
|
||||
# Copy only the ugit script into the container at /app
|
||||
WORKDIR /app
|
||||
COPY ugit .
|
||||
|
||||
# Set permissions and move the script to path
|
||||
RUN chmod +x ugit && mv ugit /usr/local/bin/
|
||||
|
||||
# Second stage: Copy only necessary binaries and their dependencies
|
||||
FROM alpine:3.18
|
||||
|
||||
COPY --from=builder /usr/local/bin/ugit /usr/bin/
|
||||
COPY --from=builder /usr/bin/git /usr/bin/
|
||||
COPY --from=builder /usr/bin/fzf /usr/bin/
|
||||
COPY --from=builder /usr/bin/tput /usr/bin/
|
||||
COPY --from=builder /usr/bin/cut /usr/bin/
|
||||
COPY --from=builder /usr/bin/tr /usr/bin/
|
||||
COPY --from=builder /usr/bin/nl /usr/bin/
|
||||
COPY --from=builder /usr/bin/gawk /usr/bin/
|
||||
COPY --from=builder /usr/bin/xargs /usr/bin
|
||||
COPY --from=builder /usr/bin/env /bin/
|
||||
COPY --from=builder /bin/bash /bin/
|
||||
|
||||
WORKDIR /app
|
||||
# Run ugit when the container launches
|
||||
CMD ["ugit"]
|
||||
33
Dockerfile-a3
Normal file
33
Dockerfile-a3
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# First stage: Install packages
|
||||
FROM alpine:3.18 as builder
|
||||
|
||||
RUN apk add --no-cache \
|
||||
bash \
|
||||
coreutils \
|
||||
git \
|
||||
ncurses \
|
||||
fzf
|
||||
|
||||
# Copy only the ugit script into the container at /app
|
||||
WORKDIR /app
|
||||
COPY ugit .
|
||||
|
||||
# Set permissions and move the script to path
|
||||
RUN chmod +x ugit && mv ugit /usr/local/bin/
|
||||
|
||||
# Second stage: Copy only necessary binaries and their dependencies
|
||||
FROM alpine:3.18
|
||||
|
||||
COPY --from=builder /usr/local/bin/ugit /usr/bin/
|
||||
COPY --from=builder /usr/bin/git /usr/bin/
|
||||
COPY --from=builder /usr/bin/fzf /usr/bin/
|
||||
COPY --from=builder /usr/bin/tput /usr/bin/
|
||||
COPY --from=builder /usr/bin/cut /usr/bin/
|
||||
COPY --from=builder /usr/bin/tr /usr/bin/
|
||||
COPY --from=builder /usr/bin/nl /usr/bin/
|
||||
COPY --from=builder /usr/bin/env /bin/
|
||||
COPY --from=builder /bin/bash /bin/
|
||||
|
||||
WORKDIR /app
|
||||
# Run ugit when the container launches
|
||||
CMD ["ugit"]
|
||||
32
Dockerfile-a4
Normal file
32
Dockerfile-a4
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# First stage: Install packages
|
||||
FROM alpine:3.18 as builder
|
||||
|
||||
RUN apk add --no-cache \
|
||||
bash \
|
||||
coreutils \
|
||||
git \
|
||||
ncurses \
|
||||
fzf
|
||||
|
||||
# Copy only the ugit script into the container at /app
|
||||
COPY ugit .
|
||||
|
||||
# Set permissions and move the script to path
|
||||
RUN chmod +x ugit && mv ugit /usr/local/bin/
|
||||
|
||||
# Second stage: Copy only necessary binaries and their dependencies
|
||||
FROM scratch
|
||||
|
||||
COPY --from=builder /usr/local/bin/ugit /usr/bin/
|
||||
COPY --from=builder /usr/bin/git /usr/bin/
|
||||
COPY --from=builder /usr/bin/fzf /usr/bin/
|
||||
COPY --from=builder /usr/bin/tput /usr/bin/
|
||||
COPY --from=builder /usr/bin/cut /usr/bin/
|
||||
COPY --from=builder /usr/bin/tr /usr/bin/
|
||||
COPY --from=builder /usr/bin/nl /usr/bin/
|
||||
COPY --from=builder /usr/bin/env /bin/
|
||||
COPY --from=builder /bin/bash /bin/
|
||||
|
||||
WORKDIR /app
|
||||
# Run ugit when the container launches
|
||||
CMD ["ugit"]
|
||||
Loading…
Reference in a new issue