refactor: using more advanced scripts for more customization
This commit is contained in:
12
ubuntu20-04/ugrep/Dockerfile
Normal file
12
ubuntu20-04/ugrep/Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
WORKDIR /build/ugrep
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y make vim git clang wget unzip libpcre2-dev libz-dev libbz2-dev liblzma-dev liblz4-dev libzstd-dev
|
||||
|
||||
RUN git clone --depth=1 https://github.com/Genivia/ugrep /build/ugrep
|
||||
|
||||
RUN ./build.sh
|
||||
|
||||
CMD ["sleep", "infinity"]
|
||||
17
ubuntu20-04/ugrep/build.sh
Executable file
17
ubuntu20-04/ugrep/build.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
APP=ugrep
|
||||
|
||||
CONTAINER="build-${APP}"
|
||||
ROOT="/build/${APP}"
|
||||
IMAGE="${CONTAINER}:latest"
|
||||
TARGET="~/bin"
|
||||
|
||||
docker build -t "${IMAGE}" "${APP}"
|
||||
docker run -d --name "${CONTAINER}" "${IMAGE}"
|
||||
|
||||
docker cp "${CONTAINER}:${ROOT}/bin/ugrep" "${TARGET}/ugrep"
|
||||
docker cp "${CONTAINER}:${ROOT}/bin/ug" "${TARGET}/ug"
|
||||
sudo docker cp "${CONTAINER}:${ROOT}/patterns/." /usr/local/share/ugrep/patterns/
|
||||
sudo docker cp "${CONTAINER}:${ROOT}/man/ugrep.1" /tmp/ugrep.1
|
||||
sudo /usr/bin/install -c -m 644 /tmp/ugrep.1 '/usr/local/share/man/man1'
|
||||
|
||||
docker remove -f "${CONTAINER}"
|
||||
Reference in New Issue
Block a user