Neeraj Gupta vor 1 Jahr
Ursprung
Commit
abdc0d262d
2 geänderte Dateien mit 51 neuen und 13 gelöschten Zeilen
  1. 26 0
      Dockerfile
  2. 25 13
      README.md

+ 26 - 0
Dockerfile

@@ -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"]

+ 25 - 13
README.md

@@ -1,5 +1,21 @@
 # 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
 
 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
 ```
 
-### Getting Started
-
-#### Accounts
-
-* Add an account
-    ```shell
-    ente-cli account add
-    ```
-
-* List accounts
-    ```shell
-    ente-cli account list
-    ```
 
+## Docker
+  Build the docker image
+  ```shell
+  docker build -t ente-cli:latest .
+  ```
+  Run the commands using:
+  ```shell
+    docker run -it --rm ente-cli:latest ./ente-cli --help 
+  ```