Skip to content

Example :: DCLint GitHub Action :: docker action #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/dclint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker-compose-linter/[email protected]
- uses: docker-compose-linter/dclint-github-action/docker-action@v1.3.0
with:
path: .
recursive: true
args: '[".", "-r", "--debug", "-f", "github"]'
38 changes: 19 additions & 19 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
name: Test Compose
version: '3.9'

Check warning on line 1 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / dclint

require-project-name-field: The "name" field should be present.

Check failure on line 1 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / dclint

no-version-field: The "version" field should not be present.

services:
b-service:
build:
context: ../../app/b-service
dockerfile: Dockerfile
target: builder
args:
- TEST1=${TEST}
- TEST2=${TEST}
container_name: b-service
depends_on:
- c-service
volumes:
- ../../app/flexible-forms-client/:/var/www/app
- /var/www/app/node_modules
ports:
- '127.0.0.1:11131:3000'
command: sh -c "npm run start"
a-service:

Check warning on line 21 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / dclint

services-alphabetical-order: Service "a-service" should be before "b-service".
build:
context: ../../tests/a-service
dockerfile: Dockerfile
Expand All @@ -22,24 +39,7 @@
- '127.0.0.1:11032:3000'
command: sh -c "tail -f /dev/null"
expose:
- '3000'
b-service:
build:
context: ../../app/b-service
dockerfile: Dockerfile
target: builder
args:
- TEST1=${TEST}
- TEST2=${TEST}
container_name: b-service
depends_on:
- c-service
volumes:
- ../../app/flexible-forms-client/:/var/www/app
- /var/www/app/node_modules
ports:
- '127.0.0.1:11131:3000'
command: sh -c "npm run start"
- 3000

Check warning on line 42 in docker-compose.yml

View workflow job for this annotation

GitHub Actions / dclint

require-quotes-in-ports: Ports in `ports` and `expose` sections should be enclosed in quotes.
c-service:
build:
context: ../../tests/c-service
Expand Down