Skip to content
Snippets Groups Projects
Verified Commit ca4ca5a1 authored by Jonas Zohren's avatar Jonas Zohren :speech_balloon:
Browse files

Initial setup

parents
Branches
No related tags found
No related merge requests found
Pipeline #80639 failed
*.pdf filter=lfs diff=lfs merge=lfs -text
slides.pdf
slides.tex
build sandbox:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
- >-
/kaniko/executor
--context "${CI_PROJECT_DIR}/sandbox"
--dockerfile "${CI_PROJECT_DIR}/sandbox/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}/sandbox:latest"
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
build pdf:
image: registry.gitlab.fachschaften.org/nicolas.lenz/pandoc-plus
stage: build
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- make -f template/makefile slides.tex slides.pdf
artifacts:
paths:
- slides.pdf
- slides.tex
pages:
stage: deploy
script:
- mkdir public
- mv slides.pdf public
artifacts:
paths:
- public
only:
- main
[submodule "template"]
path = template
url = https://git.eisfunke.com/document/pandoc-template/slides.git
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "echo",
"type": "shell",
"command": "make -f template/makefile",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
# Dinge finden auf Linux
[**View as PDF**](https://foss-ag.fspages.org/presentations/finden/slides.pdf)
## Sandbox
Bei diesem Vortrag haben die Teilnehmer\*innen die Möglichkeit, die vorgestellten Tools direkt auszuprobieren.
Dazu wird im Ordner `sandbox/` ein Dockerfile bereitgestellt, in dem diese Tools bereits installiert sind.
Besuchen die Teilnehmer\*innen die in der Vorlesung verlinkte Website, öffnet sich für sie ein Web-Terminal zu einem neuen Dockercontainer mit diesem Image.
title: Dinge finden auf Linux
subtitle: find, grep, fd, ripgrep, pdfgrep, ripgrepall
color-primary: 299f64
color-progress-bg: 3a989e
color-progress-fg: 003e42
logo: res/foss.png
author: Jonas Zohren
date: 2022-05-19
institute: |
[foss-ag.de](https://foss-ag.de)
flake: false
res/foss.png

30 KiB

#syntax=docker/dockerfile:1
FROM alpine:latest AS ripgrep-download
RUN wget --tries=3 --output-document /ripgrep.deb \
"https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep_13.0.0_amd64.deb"
FROM alpine:latest AS fd-download
RUN wget --tries=3 --output-document /find-fd.deb \
"https://github.com/sharkdp/fd/releases/download/v8.3.2/fd-musl_8.3.2_amd64.deb"
FROM alpine:latest AS tealdear-download
RUN wget --tries=3 --output-document /tealdear \
"https://github.com/dbrgn/tealdeer/releases/download/v1.5.0/tealdeer-linux-x86_64-musl"
RUN wget --tries=3 --output-document /completions_fish \
"https://github.com/dbrgn/tealdeer/releases/download/v1.5.0/completions_fish"
FROM alpine:latest AS rg-all-download
WORKDIR /
RUN wget --tries=3 --output-document /rg-all.tar.gz \
"https://github.com/phiresky/ripgrep-all/releases/download/v0.9.6/ripgrep_all-v0.9.6-x86_64-unknown-linux-musl.tar.gz"
RUN tar xvf ./*.tar.gz --strip-components=1
FROM debian:11 AS installing
ARG USER="studi"
RUN useradd --home "/home/${USER}" --shell "/usr/bin/fish" --uid 1111 --user-group "${USER}"
RUN apt-get update && apt-get install -yq \
fish \
pdfgrep \
pandoc \
poppler-utils \
ffmpeg
# Install tealder (Rust client for tldr)
COPY --from=tealdear-download --chown=${USER}:${USER} /completions_fish /home/${USER}/.config/fish/completions/tldr.fish
COPY --from=tealdear-download /tealdear /usr/bin/tldr
RUN chmod +x /usr/bin/tldr
# Install ripgrep:
COPY --from=ripgrep-download /ripgrep.deb /ripgrep.deb
RUN dpkg -i /ripgrep.deb && rm /ripgrep.deb
# Install fd:
COPY --from=fd-download /find-fd.deb /find-fd.deb
RUN dpkg -i /find-fd.deb && rm /find-fd.deb
# Install ripgrep-all:
COPY --from=rg-all-download /rga /rga-preproc /usr/bin/
# Compress into less layers
FROM scratch AS final
ARG USER="studi"
COPY --from=installing / /
USER ${USER}
WORKDIR /home/${USER}/
ENTRYPOINT [ "/usr/bin/fish" ]
RUN fish -c "tldr --update"
## Ende
:::::: {.columns align=center}
::: {.column width="65%"}
\Large
**Danke für Eure Aufmerksamkeit!**
\normalsize
\
**Mehr Infos:** [foss-ag.de](https://foss-ag.de)
**Kontakt per Matrix:** [foss-ag.de/chat](https://foss-ag.de/chat)
**Treffen:** Montag, 18:00 Uhr, OH14/E38
:::
::: {.column width="35%"}
![](res/foss.png)
:::
::::::::::::::
::: center
\small
Diese Slides gibt es unter [foss-ag.de/dap2/finden](https://foss-ag.de/dap2/finden)
:::
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment