Compare commits

...

4 Commits

2 changed files with 22 additions and 12 deletions

View File

@ -1,17 +1,17 @@
FROM golang:alpine AS buildenv
FROM golang:1.14.2-alpine3.11 AS buildenv
ARG VERSION="0.3.0"
ENV TEA_VERSION="${VERSION}"
ARG CGO_ENABLED="0"
ARG GOOS="linux"
WORKDIR $GOPATH/src
RUN apk add --no-cache git && \
RUN apk add --no-cache git=2.24.3-r0 && \
git config --global advice.detachedHead false && \
git clone --single-branch https://gitea.com/gitea/tea -b v${VERSION} && \
cd tea && \
git clone --single-branch https://gitea.com/gitea/tea -b v${TEA_VERSION} . && \
go get -v . && \
go build -v -a -ldflags "-X main.Version=$VERSION" -o /tea .
go build -v -a -ldflags "-X main.Version=${TEA_VERSION}" -o /tea .
FROM scratch
LABEL maintainer="Tamás Gérczei <tamas@gerczei.eu>"

View File

@ -1,11 +1,21 @@
# tea: A command line tool to interact with Gitea servers
## tea: A command line tool to interact with Gitea servers
## Build
### Build
- docker build . -t gitea/tea:0.3.0
### Usage
- docker volume create tea
- alias tea='docker run --rm -v tea:/app gitea/tea:0.3.0'
- tea login add -n <name_this_login> -u <your_gitea_url> -t <your_gitea_application_token> -i
...or to build a specific release (check [here](https://gitea.com/gitea/tea/releases)):
#### tea stores its configuration in a file named 'tea.yml', which the above will store on a volume named 'tea' so that it might persist
- export VERSION="<b>0.2.0</b>"
- docker build . -t "gitea/tea:${VERSION}" --build-arg VERSION="${VERSION}"
### Configuration
- docker volume create tea
- alias tea='docker run --rm -v tea:/app gitea/tea:<b><your_release></b>'
- tea login add -n <b><name_this_login></b> -u <b><your_gitea_url></b> -t <b><your_gitea_application_token></b> -i
### Usage
- tea
#### Notes
- tea stores its configuration in a file named 'tea.yml', which the above will store on a volume named 'tea' so that it might persist
- a pre-built [image](https://hub.docker.com/repository/docker/tgerczei/tea) is published via the Docker Hub