Sign inSign up

leplusorg/csv

Sponsored OSS

By Leplus.org

•Updated 4 days ago

Multi-platform Docker container with utilities to process CSV files.

Image
Languages & frameworks
Integration & delivery
Data science
0

100K+

Dockerfile
FROM alpine:3.24.2@sha256:294b683cb724975bec92580e1e685676bd4b50bda910ddb8c51d4cabeaec77e6

HEALTHCHECK NONE

ENTRYPOINT []

ARG USER_NAME=default
ARG USER_HOME=/home/default
ARG USER_ID=1000
ARG USER_GECOS=Default

SHELL ["/bin/ash", "-euo", "pipefail", "-c"]

RUN apk upgrade --no-cache \
    && apk add --no-cache \
    coreutils=9.11-r0 \
    csvq=1.18.1-r28 \
    curl=8.22.0-r0 \
    dasel=2.8.1-r16 \
    gawk=5.3.2-r2 \
    git=2.54.0-r0 \
    grep=3.12-r0 \
    miller=6.16.0-r6 \
    pandoc-cli=3.10-r0 \
    pipx=1.14.0-r0 \
    py3-pip=26.1.2-r0 \
    python3=3.14.8-r0 \
    sed=4.9-r2 \
    yq-go=4.53.3-r1 \
    && apk cache --no-cache clean \
    && rm -rf /var/cache/apk/*

COPY requirements.txt /tmp/requirements.txt

# Install each app from requirements.txt in its own venv, using the lines
# marked "constraint" as pip constraints to pin some of their dependencies.
RUN pipx ensurepath --global \
    && sed -n -e 's/#[[:space:]]*constraint[[:space:]]*$//p' /tmp/requirements.txt > /tmp/constraints.txt \
    && sed -e '/#[[:space:]]*constraint[[:space:]]*$/d' -e 's/#.*//' /tmp/requirements.txt \
    | xargs -n 1 pipx install --global --pip-args=--constraint=/tmp/constraints.txt \
    && rm -f /tmp/requirements.txt /tmp/constraints.txt

RUN adduser \
  --home "${USER_HOME}" \
  --uid "${USER_ID}" \
  --gecos "${USER_GECOS}" \
  --disabled-password \
  "${USER_NAME}"

USER "${USER_NAME}"

ENV HOME="${USER_HOME}"

WORKDIR "${HOME}"