Skip to content

Commit

Permalink
refactor: rename docker-plugins to docker-cli-plugins (#10)
Browse files Browse the repository at this point in the history
Signed-off-by: Kaan Yagci <[email protected]>
  • Loading branch information
kaanyagci authored Jun 6, 2024
1 parent 7cd36d8 commit f11d24a
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
paths:
- cli/*$
- core/**
- docker-plugins/**
- docker-cli-plugins/**
- example/**
concurrency:
group: "${{ github.workflow_ref }} - ${{ github.ref }} - ${{ github.event_name }}"
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
OUTPUT_FOLDER?=./out
PLUGINS_OUTPUT_FOLDER?=${OUTPUT_FOLDER}/docker-plugins
PLUGINS_OUTPUT_FOLDER?=${OUTPUT_FOLDER}/docker-cli-plugins
DOCKER_PLUGINS_PATH=~/.docker/cli-plugins

.PHONY: build
Expand All @@ -11,7 +11,7 @@ build-plugins: ensure-plugins-output-folder-exists build-docker-render

.PHONY: build-docker-render
build-docker-render:
go build -o ${PLUGINS_OUTPUT_FOLDER}/docker-render docker-plugins/render/docker_render.go
go build -o ${PLUGINS_OUTPUT_FOLDER}/docker-render docker-cli-plugins/render/docker_render.go

.PHONY: ensure-output-folder-exists
ensure-output-folder-exists:
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Wharf

A templating system engine for Docker
A templating system for Dockerfiles.

- [Docker plugins](./docker-plugins/README.md)
- [CLI](./cli/README.md)
- [Go dependency](./core/README.md)
## How to use it?

Wharf can be used in several ways, you can choose how you want to use it

- [Docker CLI Plugins](./docker-cli-plugins/README.md)
- [Go dependency](./core/README.md)
<!-- - [CLI](./cli/README.md) -->
13 changes: 13 additions & 0 deletions docker-cli-plugins/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Using Wharf as Docker CLI Plugin

Docker CLI plugins is used to extend the cappabilities of the Docker CLI. Wharf provide a small list of Docker CLI plugins. You can use them as `docker <plugin>`

## Install
To install all plugins, you can use the following command from [the project's root.](../)

```bash
make install-plugins
```

## List of avaialble plugins:
- [render](./render/README.md): Create a Dockerfile from a template
3 changes: 3 additions & 0 deletions docker-cli-plugins/commons/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/Makepad-fr/wharf/docker-cli-plugins/commons

go 1.22.2
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

## Install the Docker plugin

Use the following Makefile command to install the Docker plugin in your current Docker CLI installation
Use the following command to install the Docker plugin in your current Docker CLI installation

```bash
make install
make install-plugins
```

Test the installation using `docker render` from your Terminal.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"

wharf "github.com/Makepad-fr/wharf/core"
"github.com/Makepad-fr/wharf/docker-plugins/commons"
"github.com/Makepad-fr/wharf/docker-cli-plugins/commons"
)

var metadata = commons.PluginMetadata{
Expand Down
14 changes: 14 additions & 0 deletions docker-cli-plugins/render/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module github.com/Makepad-fr/wharf/docker-cli-plugins/render

go 1.22.2

replace github.com/Makepad-fr/wharf/core => ../../core

replace github.com/Makepad-fr/wharf/docker-cli-plugins/commons => ../commons

require (
github.com/Makepad-fr/wharf/core v0.0.0-00010101000000-000000000000
github.com/Makepad-fr/wharf/docker-cli-plugins/commons v0.0.0-00010101000000-000000000000
)

require gopkg.in/yaml.v3 v3.0.1 // indirect
File renamed without changes.
6 changes: 0 additions & 6 deletions docker-plugins/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions docker-plugins/commons/go.mod

This file was deleted.

14 changes: 0 additions & 14 deletions docker-plugins/render/go.mod

This file was deleted.

4 changes: 2 additions & 2 deletions go.work
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ go 1.22.2
use (
./cli
./core
./docker-plugins/commons
./docker-plugins/render
./docker-cli-plugins/commons
./docker-cli-plugins/render
)

0 comments on commit f11d24a

Please sign in to comment.