-
Notifications
You must be signed in to change notification settings - Fork 512
Add env OCI_DISPLAY_NAME to set display name #17
base: main
Are you sure you want to change the base?
Conversation
add .env OCI_DISPLAY_NAME
Display name
parameter position
I created a docker image with your code |
Hi, could you please share |
As for the instance name, it’s better to implement through a setter instead of argument: by changing the arguments/their order we can ruin those who will watch YouTube or read Medium :) I’ll do this later, maybe, thank you |
…or just simple getter which will fallback with a default value if env var is not set |
index.php getenv('OCI_DISPLAY_NAME') ?: 'instance-' . date('Ymd-Hi'), |
Dockerfile with build per layer for build performance https://github.com/hassegawa/oracle-tf/tree/performance github action |
@hassegawa
I have tested Thanks. |
|
Can you try again? |
@hassegawa I tested your docker image, it works nicely :). My command: docker run --rm -d \
-v $(pwd)/.env:/app/oci-arm-host-capacity/.env \
-v $(pwd)/key.pem:/app/oci-arm-host-capacity/key.pem \
hassegawa/machine I also use relative path Maybe introduce |
By the way, I created a Dockerfile using alpine, the image size is very small ~190MB. FROM composer:2
RUN apk add --no-cache jq~=1.6
WORKDIR /app/oci-arm-host-capacity
COPY ./oci-arm-host-capacity /app/oci-arm-host-capacity
RUN chmod +x run.sh \
&& cd /app/oci-arm-host-capacity && \
composer update && \
composer install
ENTRYPOINT [ "sh", "run.sh" ]
However I think this approach produces a better image, easier to maintain. |
we cam try remove this function: |
To set RETRY_DELAY_TIME = 5 minutes, TAG >= v0.1.14
|
Add env OCI_DISPLAY_NAME to set display name