Add dockerfile
This commit is contained in:
parent
9942fd764e
commit
abdc0d262d
2 changed files with 51 additions and 13 deletions
26
Dockerfile
Normal file
26
Dockerfile
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
FROM golang:1.20-alpine3.17 as builder
|
||||||
|
RUN apk add --no-cache gcc musl-dev git build-base pkgconfig libsodium-dev
|
||||||
|
|
||||||
|
ENV GOOS=linux
|
||||||
|
|
||||||
|
WORKDIR /etc/ente/
|
||||||
|
|
||||||
|
COPY go.mod .
|
||||||
|
COPY go.sum .
|
||||||
|
RUN go mod download
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||||
|
go build -o ente-cli main.go
|
||||||
|
|
||||||
|
FROM alpine:3.17
|
||||||
|
RUN apk add libsodium-dev
|
||||||
|
COPY --from=builder /etc/ente/ente-cli .
|
||||||
|
#COPY configurations configurations
|
||||||
|
#COPY migrations migrations
|
||||||
|
#COPY mail-templates mail-templates
|
||||||
|
|
||||||
|
ARG GIT_COMMIT
|
||||||
|
ENV GIT_COMMIT=$GIT_COMMIT
|
||||||
|
|
||||||
|
CMD ["./ente-cli"]
|
30
README.md
30
README.md
|
@ -1,5 +1,21 @@
|
||||||
# cli tool for exporting ente photos
|
# cli tool for exporting ente photos
|
||||||
|
|
||||||
|
### Getting Started
|
||||||
|
|
||||||
|
#### Accounts
|
||||||
|
|
||||||
|
* Add an account
|
||||||
|
```shell
|
||||||
|
ente-cli account add
|
||||||
|
```
|
||||||
|
|
||||||
|
* List accounts
|
||||||
|
```shell
|
||||||
|
ente-cli account list
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
Run the release script to build the binary and run it.
|
Run the release script to build the binary and run it.
|
||||||
|
@ -18,17 +34,13 @@ or you can run the following command
|
||||||
./bin/ente-cli --help
|
./bin/ente-cli --help
|
||||||
```
|
```
|
||||||
|
|
||||||
### Getting Started
|
|
||||||
|
|
||||||
#### Accounts
|
## Docker
|
||||||
|
Build the docker image
|
||||||
* Add an account
|
|
||||||
```shell
|
```shell
|
||||||
ente-cli account add
|
docker build -t ente-cli:latest .
|
||||||
```
|
```
|
||||||
|
Run the commands using:
|
||||||
* List accounts
|
|
||||||
```shell
|
```shell
|
||||||
ente-cli account list
|
docker run -it --rm ente-cli:latest ./ente-cli --help
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue