I\'m trying to build Oracle WebLogic Docker image with custom environment variables
$ docker build -t 12213-domain --build-arg ADMIN_PORT=8888 --build-arg AD
if you want to run on Docker-Compose with Dockerfile ;
Docker-compose.yml ;
version: '3.3'
services:
somecontb:
container_name: somecontainer
hostname : somecontainer
build:
args:
SOME_ARG: Default_Value
context: .
dockerfile: DockerFile
image : someimage
volumes:
- somecontainer_volume:/somefile
volumes:
somecontainer_volume:
.
.
.
DockerFile ;
FROM alpine
ARG SOME_ARG
ENV SOME_ENV=$SOME_ARG
docker commands ;
docker-compose down
docker volume rm somecontainer_volume
docker-compose build --no-cache
docker-compose up -d