Skip to content

Commit 183da1f

Browse files
committed
move ./docker to ./build/docker
1 parent 75c4e66 commit 183da1f

40 files changed

+18
-18
lines changed

.github/workflows/docker-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
uses: docker/build-push-action@v6
4242
with:
4343
context: .
44-
file: ./Dockerfile${{ matrix.flavor == 'debian' && '.debian' || '' }}
44+
file: ./build/docker/Dockerfile${{ matrix.flavor == 'debian' && '.debian' || '' }}
4545
tags: crowdsecurity/crowdsec:test${{ matrix.flavor == 'full' && '' || '-' }}${{ matrix.flavor == 'full' && '' || matrix.flavor }}
4646
target: ${{ matrix.flavor == 'debian' && 'full' || matrix.flavor }}
4747
platforms: linux/amd64
@@ -57,17 +57,17 @@ jobs:
5757
with:
5858
version: 0.5.24
5959
enable-cache: true
60-
cache-dependency-glob: "./docker/test/uv.lock"
60+
cache-dependency-glob: "./build/docker/test/uv.lock"
6161

6262
- name: "Set up Python"
6363
uses: actions/setup-python@v5
6464
with:
65-
python-version-file: "./docker/test/.python-version"
65+
python-version-file: "./build/docker/test/.python-version"
6666

6767
# running serially to reduce test flakiness
6868
- name: Lint and run the tests
6969
run: |
70-
cd docker/test
70+
cd build/docker/test
7171
uv sync --all-extras --dev --locked
7272
uv run ruff check
7373
uv run basedpyright

.github/workflows/publish-docker-master.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ on:
77
- 'pkg/**'
88
- 'cmd/**'
99
- 'build/**'
10-
- 'docker/docker_start.sh'
11-
- 'docker/config.yaml'
10+
- 'build/docker/Dockerfile'
11+
- 'build/docker/Dockerfile.debian'
12+
- 'build/docker/config.yaml'
13+
- 'build/docker/docker_start.sh'
1214
- '.github/workflows/publish-docker-master.yml'
1315
- '.github/workflows/publish-docker.yml'
14-
- 'Dockerfile'
15-
- 'Dockerfile.debian'
1616
- 'go.mod'
1717
- 'go.sum'
1818
- 'Makefile'

.github/workflows/publish-docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
uses: docker/build-push-action@v6
9797
with:
9898
context: .
99-
file: ./Dockerfile${{ inputs.debian && '.debian' || '' }}
99+
file: ./build/docker/Dockerfile${{ inputs.debian && '.debian' || '' }}
100100
push: ${{ inputs.push }}
101101
tags: ${{ steps.slim.outputs.tags }}
102102
target: slim
@@ -112,7 +112,7 @@ jobs:
112112
uses: docker/build-push-action@v6
113113
with:
114114
context: .
115-
file: ./Dockerfile${{ inputs.debian && '.debian' || '' }}
115+
file: ./build/docker/Dockerfile${{ inputs.debian && '.debian' || '' }}
116116
push: ${{ inputs.push }}
117117
tags: ${{ steps.full.outputs.tags }}
118118
target: full

.github/workflows/update_docker_hub_doc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- master
77
paths:
8-
- 'docker/README.md'
8+
- 'build/docker/README.md'
99

1010
jobs:
1111
update-docker-hub-readme:
@@ -26,4 +26,4 @@ jobs:
2626
password: ${{ secrets.DOCKER_PASSWORD }}
2727
repository: crowdsecurity/crowdsec
2828
short-description: "Crowdsec - An open-source, lightweight agent to detect and respond to bad behaviours."
29-
readme-filepath: "./docker/README.md"
29+
readme-filepath: "./build/docker/README.md"

Dockerfile renamed to build/docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/co
4040

4141
COPY --from=build /go/bin/yq /usr/local/bin/crowdsec /usr/local/bin/cscli /usr/local/bin/
4242
COPY --from=build /etc/crowdsec /staging/etc/crowdsec
43-
COPY --from=build /go/src/crowdsec/docker/docker_start.sh /
44-
COPY --from=build /go/src/crowdsec/docker/config.yaml /staging/etc/crowdsec/config.yaml
43+
COPY --from=build /go/src/crowdsec/build/docker/docker_start.sh /
44+
COPY --from=build /go/src/crowdsec/build/docker/config.yaml /staging/etc/crowdsec/config.yaml
4545
COPY --from=build /var/lib/crowdsec /staging/var/lib/crowdsec
4646
RUN yq -n '.url="http://0.0.0.0:8080"' | install -m 0600 /dev/stdin /staging/etc/crowdsec/local_api_credentials.yaml
4747

Dockerfile.debian renamed to build/docker/Dockerfile.debian

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ RUN apt-get update && \
5656

5757
COPY --from=build /go/bin/yq /usr/local/bin/crowdsec /usr/local/bin/cscli /usr/local/bin/
5858
COPY --from=build /etc/crowdsec /staging/etc/crowdsec
59-
COPY --from=build /go/src/crowdsec/docker/docker_start.sh /
60-
COPY --from=build /go/src/crowdsec/docker/config.yaml /staging/etc/crowdsec/config.yaml
59+
COPY --from=build /go/src/crowdsec/build/docker/docker_start.sh /
60+
COPY --from=build /go/src/crowdsec/build/docker/config.yaml /staging/etc/crowdsec/config.yaml
6161
RUN yq -n '.url="http://0.0.0.0:8080"' | install -m 0600 /dev/stdin /staging/etc/crowdsec/local_api_credentials.yaml && \
6262
yq eval -i ".plugin_config.group = \"nogroup\"" /staging/etc/crowdsec/config.yaml
6363

docker/README.md renamed to build/docker/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ You can build your custom images with Dockerfile and Dockerfile-debian.
4848
For example, if you need a Debian version without plugin notifiers:
4949

5050
```console
51-
$ docker build -f Dockerfile.debian --target slim .
51+
$ docker build -f build/docker/Dockerfile.debian --target slim .
5252
```
5353

5454
The supported values for target are: full, geoip, plugins, slim.
5555

5656
Note: for crowdsec versions < 1.5.0, the syntax is
5757

5858
```console
59-
$ docker build -f Dockerfile.debian --build-arg=BUILD_ENV=slim .
59+
$ docker build -f build/docker/Dockerfile.debian --build-arg=BUILD_ENV=slim .
6060
```
6161

6262

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)