mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-11 22:14:02 +01:00
docker: ensure cleaner contexts for Docker builds
Some checks failed
CI / 🤖 Check dependabot status (push) Has been cancelled
CI / 🐧 Test on Linux (${{ github.ref_type == 'tag' }}, misc) (push) Has been cancelled
CI / 🐧 Test on Linux (coverage) (push) Has been cancelled
CI / 🐧 Test on Linux (regular) (push) Has been cancelled
CI / ❄️ Build on Nix (push) Has been cancelled
CI / 🍏 Build and test on macOS (push) Has been cancelled
CI / 🧪 End-to-end testing (push) Has been cancelled
CI / 🔍 Upload code coverage (push) Has been cancelled
CI / 🔬 Test only Go (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 20) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 22) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 24) (push) Has been cancelled
CI / ⚖️ Check licenses (push) Has been cancelled
CI / 🐋 Build Docker images (push) Has been cancelled
CI / 🐋 Tag Docker images (push) Has been cancelled
CI / 🚀 Publish release (push) Has been cancelled
Build IPinfo geoipupdate image / Build Docker images (push) Has been cancelled
Update Nix dependency hashes / Update dependency hashes (push) Has been cancelled
Some checks failed
CI / 🤖 Check dependabot status (push) Has been cancelled
CI / 🐧 Test on Linux (${{ github.ref_type == 'tag' }}, misc) (push) Has been cancelled
CI / 🐧 Test on Linux (coverage) (push) Has been cancelled
CI / 🐧 Test on Linux (regular) (push) Has been cancelled
CI / ❄️ Build on Nix (push) Has been cancelled
CI / 🍏 Build and test on macOS (push) Has been cancelled
CI / 🧪 End-to-end testing (push) Has been cancelled
CI / 🔍 Upload code coverage (push) Has been cancelled
CI / 🔬 Test only Go (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 20) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 22) (push) Has been cancelled
CI / 🔬 Test only JS (${{ needs.dependabot.outputs.package-ecosystem }}, 24) (push) Has been cancelled
CI / ⚖️ Check licenses (push) Has been cancelled
CI / 🐋 Build Docker images (push) Has been cancelled
CI / 🐋 Tag Docker images (push) Has been cancelled
CI / 🚀 Publish release (push) Has been cancelled
Build IPinfo geoipupdate image / Build Docker images (push) Has been cancelled
Update Nix dependency hashes / Update dependency hashes (push) Has been cancelled
`make docker` builds the context from a tarball. We don't use git archive as we want to allow local modifications without committing them. This is not unlike nix work. For the other Docker files, use a tailored `.dockerignore`: - dev, ignore everything except bin/akvorado - ipinfo-geoipupdate, ignore everything except the update script - nix, let nix handle it from the Git repository
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
.git
|
||||
console/frontend/node_modules/
|
||||
2
.github/workflows/ipinfo.yml
vendored
2
.github/workflows/ipinfo.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: docker
|
||||
context: .
|
||||
file: docker/Dockerfile.ipinfo-geoipupdate
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
|
||||
4
Makefile
4
Makefile
@@ -286,8 +286,8 @@ version:
|
||||
.PHONY: docker docker-dev
|
||||
DOCKER_BUILD_ARGS =
|
||||
docker: ; $(info $(M) build Docker image…) @ ## Build Docker image
|
||||
$Q docker build --pull -f docker/Dockerfile $(DOCKER_BUILD_ARGS) \
|
||||
--build-arg VERSION=$(VERSION) -t ghcr.io/akvorado/akvorado:main .
|
||||
$Q git ls-files | tar -T- -cf- | docker build --pull -f docker/Dockerfile $(DOCKER_BUILD_ARGS) \
|
||||
--build-arg VERSION=$(VERSION) -t ghcr.io/akvorado/akvorado:main -
|
||||
docker-dev: TARGETOS=linux
|
||||
docker-dev: all ; $(info $(M) build development Docker image…) @ ## Build development Docker image
|
||||
$Q docker build -f docker/Dockerfile.dev $(DOCKER_BUILD_ARGS) \
|
||||
|
||||
2
docker/Dockerfile.dev.dockerignore
Normal file
2
docker/Dockerfile.dev.dockerignore
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!bin/akvorado
|
||||
1
docker/Dockerfile.dockerignore
Normal file
1
docker/Dockerfile.dockerignore
Normal file
@@ -0,0 +1 @@
|
||||
.git
|
||||
@@ -5,7 +5,7 @@ RUN apk add --no-cache curl
|
||||
WORKDIR /data
|
||||
VOLUME /data
|
||||
|
||||
COPY --chmod=555 ipinfo-geoipupdate.sh /usr/local/bin/ipinfo-geoipupdate.sh
|
||||
COPY --chmod=555 docker/ipinfo-geoipupdate.sh /usr/local/bin/ipinfo-geoipupdate.sh
|
||||
|
||||
LABEL org.opencontainers.image.description="IPinfo database updater"
|
||||
HEALTHCHECK --interval=20s CMD test -f /tmp/healthy
|
||||
|
||||
2
docker/Dockerfile.ipinfo-geoipupdate.dockerignore
Normal file
2
docker/Dockerfile.ipinfo-geoipupdate.dockerignore
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!docker/ipinfo-geoipupdate.sh
|
||||
Reference in New Issue
Block a user