Downloading the CLI directly instead of using npm
This commit is contained in:
parent
5104c5c0f3
commit
21be29d720
23
Dockerfile
23
Dockerfile
@ -1,12 +1,17 @@
|
|||||||
FROM python:3.11-slim-bookworm
|
FROM python:3.11.0-slim-bullseye
|
||||||
|
|
||||||
RUN apt update && apt install -y npm && \
|
|
||||||
npm i -g @bitwarden/cli && \
|
|
||||||
apt purge -y npm
|
|
||||||
|
|
||||||
WORKDIR /bitwarden-to-keepass
|
WORKDIR /bitwarden-to-keepass
|
||||||
|
|
||||||
COPY requirements.txt requirements.txt
|
|
||||||
RUN pip install -r requirements.txt
|
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y unzip curl jq && \
|
||||||
|
# Taken from https://github.com/tangowithfoxtrot/bw-docker/blob/main/Dockerfile#L7
|
||||||
|
export VER=$(curl -H "Accept: application/vnd.github+json" https://api.github.com/repos/bitwarden/clients/releases | jq -r 'sort_by(.published_at) | reverse | .[].name | select( index("CLI") )' | sed 's:.*CLI v::' | head -n 1) && \
|
||||||
|
curl -LO "https://github.com/bitwarden/clients/releases/download/cli-v{$VER}/bw-linux-{$VER}.zip" && \
|
||||||
|
unzip *.zip && chmod +x ./bw && \
|
||||||
|
mv bw /bin/ && \
|
||||||
|
pip install --no-cache-dir --upgrade pip && \
|
||||||
|
pip install --no-cache-dir -r requirements.txt && \
|
||||||
|
apt-get purge -y --auto-remove unzip curl jq && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user