fix building fresh docker images for integration tests

i always get bitten by some caching or missing checks when i use docker...
Dockerfile.moxmail doesn't exist anymore, but that doesn't matter, it doesn't
even look at it but will just use some image that is still around (based on the
name?) i suppose that means docker-compose also doesn't rebuild an image when
the dockerfile mentioned in the build changes.
This commit is contained in:
Mechiel Lukkien 2023-07-26 21:58:12 +02:00
parent 5be4e91979
commit 6273afe84f
No known key found for this signature in database
2 changed files with 5 additions and 7 deletions

View file

@ -49,8 +49,8 @@ fuzz:
test-integration:
docker image build --pull -f Dockerfile -t mox_integration_moxmail .
docker image build --pull -f testdata/integration/Dockerfile.test -t mox_integration_test testdata/integration
docker image build --pull --no-cache -f Dockerfile -t mox_integration_moxmail .
docker image build --pull --no-cache -f testdata/integration/Dockerfile.test -t mox_integration_test testdata/integration
-rm -rf testdata/integration/moxacmepebble/data
-rm -rf testdata/integration/moxmail2/data
-rm -f testdata/integration/tmp-pebble-ca.pem

View file

@ -1,6 +1,6 @@
version: '3.7'
services:
# We run integration_test.go from this container, it connects to both mox instances.
# We run integration_test.go from this container, it connects to the other mox instances.
test:
hostname: test.mox1.example
image: mox_integration_test
@ -86,10 +86,8 @@ services:
localserve:
hostname: localserve.mox1.example
domainname: mox1.example
build:
dockerfile: Dockerfile.moxmail
context: testdata/integration
command: ["sh", "-c", "set -e; chmod o+r /etc/resolv.conf; go run . -- localserve -ip 172.28.1.60"]
image: mox_integration_moxmail
command: ["sh", "-c", "set -e; chmod o+r /etc/resolv.conf; mox localserve -ip 172.28.1.60"]
volumes:
- ./.go:/.go
- ./testdata/integration/resolv.conf:/etc/resolv.conf