Comments (3)
so i thought about this a little more this morning and realized this doesn't account for exposing ports as part of building the image although i still think this works, the property handler would just need to be a bit smarter and know if it saw an entry w/o any colons, it should be used in the build process.
from docker-maven-plugin.
The example above can be already written as
docker.ports.5678 = 8080
docker.ports.0.0.0.0\:80 = 80
docker.ports.host.port = 22
but you are right, this doesn't look very nice. BTW, if you are using these properties in property files you need to escape colons, too.
If you use properties for building docker images, mapping likes those above are taken into account (in this case 8080, 80 and 22 are exposed). If I understand you right, you want also expose a lonely port (without any colon). Do you have a use case where an exposed port should not be exported during the integration test ?
BTW, for the env
part there also a limitation: With docker.env
properties you set the environment for building and running an image (which is also not optimal, of course). One could add docker.envbuild
and docker.envrun
for environment variables which are set only for the building and running, respectively (and docker.env
for variables to be set in both cases).
Since the property stuff is not yet released, if you like you can go ahead and adapt PropertyConfigHandler
for using ports as a list ....
from docker-maven-plugin.
Any thoughts about this ? I want to get this in into 0.10.5 right now because it's a new feature.
from docker-maven-plugin.
Related Issues (20)
- RegistryServiceTest : remove unused variable `hasImage` and `dockerFileUtilMockedStatic` HOT 3
- LogRequestor : Replace `com.google.common.base.Charsets.UTF_8` with `StandardCharsets.UTF_8` HOT 5
- Turning on JIB mode breaks multi-assembly images HOT 2
- <run><wait> no longer working correctly
- Cannot find default setter in class io.fabric8.maven.docker.config.ImageConfiguration while trying to execute docker:start goal HOT 1
- Can't use <packaging>docker</packaging> in a multi-module project HOT 1
- Version 0.44.0 fails to use the `<args>` configuration to populate the Docker build-args HOT 5
- support Dockerfile RUN <<EOF HOT 1
- docker:push failed with ARG in FROM HOT 5
- DockerComposeServiceWrapper : Use `isEmpty()` to check collection is empty HOT 3
- WatchService : Anonymous `new Runnable()` can be replaced with lambda HOT 5
- Quickstarts : Improve `it/spring-boot-with-jib` integration test HOT 2
- Ability to
- Error Encountered When Building Multi-Architecture Docker Images Using docker-maven-plugin HOT 1
- Write portPropertyFile as soon as the container is started
- Unable to push docker images to Nexus using "docker-maven-plugin" HOT 1
- External Compose and Wait seems not working HOT 1
- Expected a com.google.gson.JsonObject but was com.google.gson.JsonArray
- Follow settings ingored unless specified from command line HOT 1
- How to mount secrets on build?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-maven-plugin.