You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-15Lines changed: 12 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -34,47 +34,44 @@ After these setup steps, the program will be ready for use.
34
34
35
35
## Docker
36
36
37
-
### Using Docker command
37
+
### Using Docker Command
38
38
39
39
Before using Docker, ensure Docker is installed on your system. Visit [Docker's official installation guide](https://docs.docker.com/get-docker/) for help with the installation.
40
40
41
-
1.**Build the Docker Image**:
42
-
From within the project directory (where the `Dockerfile` is located), build your Docker image:
41
+
1.**Pull the Docker Image**:
42
+
Pull the latest image of your project directly from GitHub Container Registry:
43
43
```bash
44
-
docker build -t go-shellcron.
44
+
docker pull ghcr.io/jexsrs/go-shellcron:latest
45
45
```
46
46
47
47
2.**Run your Docker Container**:
48
-
You can run your Docker container with the following command:
48
+
Run the Docker container using the image pulled from GHCR with the following command:
49
49
```bash
50
-
docker run --name go-shellcron -v $(pwd)/scripts:/scripts -d go-shellcron
50
+
docker run --name go-shellcron -v $(pwd)/scripts:/scripts -d ghcr.io/jexsrs/go-shellcron:latest
51
51
```
52
52
53
53
### Using Docker Compose
54
54
55
55
For an even simpler setup or deployment, you can utilize Docker Compose.
56
56
57
57
1.**Create a `docker-compose.yml` file**:
58
-
Make sure you have a `docker-compose.yml` file in the root of your project with the following content:
58
+
Make sure you have a `docker-compose.yml` file in the root of your project with the following content. Note that the `build` option is replaced by directly using the image from GHCR:
59
59
```yaml
60
+
version: '3.8'
60
61
services:
61
62
go-shellcron:
62
-
container_name: go-shellcron
63
+
image: ghcr.io/jexsrs/go-shellcron:latest
63
64
restart: always
64
-
image: go-shellcron
65
-
build:
66
-
context: ./
67
-
dockerfile: Dockerfile
68
-
env_file: ".env"
69
65
volumes:
70
66
- ./scripts:/scripts
71
67
```
72
68
73
69
2. **Run using Docker Compose**:
74
-
If you wish to run the services in the background (detached mode), use:
70
+
To start your services using Docker Compose, run:
75
71
```bash
76
-
docker-compose up -d --build
72
+
docker-compose up -d
77
73
```
74
+
78
75
79
76
## Script structure
80
77
Here is a sample script to be processed by this scheduler:
0 commit comments