2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2024-11-22 07:46:25 +00:00

Makefile: add install

README.md: improve install docs
goreleaser: add README.md to release tarball

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
Adphi 2022-09-12 09:23:33 +02:00
parent 7718c533eb
commit 7f3b3a859d
Signed by: adphi
GPG Key ID: 46BE4062DB2397FF
3 changed files with 22 additions and 2 deletions

View File

@ -38,6 +38,7 @@ snapshot:
release: release:
prerelease: auto prerelease: auto
extra_files: extra_files:
- glob: README.md
- glob: LICENSE - glob: LICENSE
- glob: pgp.pub - glob: pgp.pub
changelog: changelog:

View File

@ -78,6 +78,9 @@ vet:
build-dev: docker-build .build build-dev: docker-build .build
install: docker-build
@go install -ldflags "-s -w -X '$(MODULE).Version=$(VERSION)' -X '$(MODULE).BuildDate=$(shell date)'" ./cmd/d2vm
.build: .build:
@go generate ./... @go generate ./...
@go build -o d2vm -ldflags "-s -w -X '$(MODULE).Version=$(VERSION)' -X '$(MODULE).BuildDate=$(shell date)'" ./cmd/d2vm @go build -o d2vm -ldflags "-s -w -X '$(MODULE).Version=$(VERSION)' -X '$(MODULE).BuildDate=$(shell date)'" ./cmd/d2vm

View File

@ -43,7 +43,15 @@ Obviously, **Distroless** images are not supported.
### Install from release ### Install from release
Download the latest release for your platform from the [release page](https://github.com/linka-cloud/d2vm/releases/latest) Download the latest release for your platform from the [release page](https://github.com/linka-cloud/d2vm/releases/latest).
Extract the tarball:
```bash
tar -xvzf <RELEASE-TARBALL-NAME>.tar.gz
```
Move the extracted *d2vm* binary to somewhere in your `$PATH` (`/usr/local/bin` for most users).
### Install from source ### Install from source
@ -56,7 +64,15 @@ git clone https://github.com/linka-cloud/d2vm && cd d2vm
Install using the *make*, *docker* and the Go tool chain: Install using the *make*, *docker* and the Go tool chain:
```bash ```bash
make build-dev && sudo cp d2vm /usr/local/bin/ make install
```
The *d2vm* binary is installed in the `$GOBIN` directory.
```bash
which d2vm
/go/bin/d2vm
``` ```
### Converting an existing Docker Image to VM image: ### Converting an existing Docker Image to VM image: