Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,55 +32,3 @@ jobs:
docker push quay.io/mynth/docker-vault-cli:$TAG
docker push quay.io/mynth/docker-vault-cli:latest
if: github.ref == 'refs/heads/main'

publish-arm:
runs-on: ubuntu-22.04-arm
timeout-minutes: 10
steps:
- name: Login to Quay.io
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_ID }}
password: ${{ secrets.QUAY_PW }}

- name: Checkout repository
uses: actions/checkout@v3

- name: Build docker-vault-cli container
run: docker build --platform linux/arm64 -t docker-vault-cli -f arm64.Dockerfile .

- name: Publish container
run: |
TAG=$(git rev-parse --short HEAD)
docker tag docker-vault-cli quay.io/mynth/docker-vault-cli:arm-$TAG
docker tag docker-vault-cli quay.io/mynth/docker-vault-cli:arm-latest
docker push quay.io/mynth/docker-vault-cli:arm-$TAG
docker push quay.io/mynth/docker-vault-cli:arm-latest
if: github.ref == 'refs/heads/main'

publish-python:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Login to Quay.io
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_ID }}
password: ${{ secrets.QUAY_PW }}

- name: Checkout repository
uses: actions/checkout@v3

- name: Build docker-vault-cli container
run: docker build -f Python.dockerfile -t docker-vault-cli .

- name: Publish container
run: |
TAG=$(git rev-parse --short HEAD)
docker tag docker-vault-cli quay.io/mynth/docker-vault-cli:python-$TAG
docker tag docker-vault-cli quay.io/mynth/docker-vault-cli:python
docker push quay.io/mynth/docker-vault-cli:python-$TAG
docker push quay.io/mynth/docker-vault-cli:python
if: github.ref == 'refs/heads/main'
45 changes: 29 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
FROM quay.io/mynth/python:dev as builder
FROM ubuntu:24.04 AS builder

# Install dependencies
USER root
# hadolint ignore=DL3008,DL3015
# Install Python
# hadolint ignore=DL3008
RUN apt-get update -qq && \
apt-get install -y binutils python3.12-dev
USER monty
COPY poetry.lock pyproject.toml /app/
RUN install-poetry-app src && \
poetry install --with=dev
apt-get install -y --no-install-recommends \
binutils python3.12 python3.12-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
ln -s /usr/bin/python3 /usr/bin/python
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONFAULTHANDLER=1
ENV PATH=/app/.venv/bin:$PATH

# Build vault-cli
COPY src /app/src
RUN poe build:vault-cli
# Install poetry
# hadolint ignore=DL3008,DL3009
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends \
python3.12-venv && \
python3.12 -m venv /opt/poetry && \
/opt/poetry/bin/pip install poetry && \
ln -s /opt/poetry/bin/poetry /usr/local/bin/poetry
WORKDIR /app
RUN poetry config virtualenvs.in-project true

# Save binary
USER root
RUN mv dist/vault-cli /usr/local/bin/
USER monty
# Install vault-cli app
COPY poetry.lock pyproject.toml /app/
COPY src /app/src
RUN poetry install --with=dev && \
poe build:vault-cli && \
mv dist/vault-cli /usr/local/bin/

# Create final image with vault-cli binary
FROM ubuntu:24.04
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Mynth
Copyright (c) 2023-2025 Mynth

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
20 changes: 0 additions & 20 deletions Python.dockerfile

This file was deleted.

28 changes: 8 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
# Docker vault-cli

This repository contains Docker images for vault-cli, [a 12-factor
oriented command line tool for Hashicorp
Vault](https://vault-cli.readthedocs.io/en/latest/). The images are
hosted on `quay.io/mynth/docker-vault-cli`.

## Versions

Two versions are available:

1. Standalone: Can be used in any container.
2. Python: Can be used in containers with Python installed.
This repository contains a Linux-based Docker image for `vault-cli`, [a
12-factor oriented command line tool for Hashicorp
Vault](https://vault-cli.readthedocs.io/en/latest/). The image is hosted
on `quay.io/mynth/docker-vault-cli`.

## Usage

For the standalone version, use: `quay.io/mynth/docker-vault-cli`.

For the Python version, use: `quay.io/mynth/docker-vault-cli:python`.

## Installation

For Python containers, add the following to your Dockerfile:
`vault-cli` is available as a standalone binary in
`quay.io/mynth/docker-vault-cli`.

COPY --from=quay.io/mynth/docker-vault-cli:python /dist /
## Installation into Another Container

For other containers, add:
Add the following to your Dockerfile:

COPY --from=quay.io/mynth/docker-vault-cli /usr/local/bin/vault-cli /usr/local/bin/vault-cli
24 changes: 0 additions & 24 deletions arm64.Dockerfile

This file was deleted.

98 changes: 50 additions & 48 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading