Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Unable to create hexadecimal environment variable with ECS #2123

Closed
nobiit opened this issue Jan 5, 2022 · 7 comments
Closed

Unable to create hexadecimal environment variable with ECS #2123

nobiit opened this issue Jan 5, 2022 · 7 comments
Labels
stale Inactive issue

Comments

@nobiit
Copy link

nobiit commented Jan 5, 2022

Description

Steps to reproduce the issue:

  1. Create an ECS context
docker context create ecs --from-env ${ECS_PROJECT}
docker context use ${ECS_PROJECT}
  1. Create file ecs-compose.yml with content
version: "3.8"
services:
  test:
    image: alpine
    command: env
    environment:
      ENV_NAME: "0x0123456789ABCDEF"
  1. Apply ecs-compose.yml
docker compose --project-name ${ECS_PROJECT} --file ecs-compose.yml up
  1. Check value of environment ENV_NAME
aws ecs describe-task-definition --task-definition ${ECS_PROJECT}-test:1 | grep ENV_NAME -A 1

Describe the results you received:
ENV_NAME=81985529216486900

Describe the results you expected:
ENV_NAME=0x0123456789ABCDEF

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker-compose --version:

docker-compose version 1.29.2, build 5becea4c

Output of docker version:

Client:
 Cloud integration: 1.0.17
 Version:           20.10.11+azure-3
 API version:       1.41
 Go version:        go1.16.12
 Git commit:        dea9396e184290f638ea873c76db7c80efd5a1d2
 Built:             Wed Nov 17 23:49:46 2021
 OS/Arch:           linux/amd64
 Context:           aws-ecs-dev
 Experimental:      true

Server:
 Engine:
  Version:          20.10.11+azure-3
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.12
  Git commit:       847da184ad5048b27f5bdf9d53d070f731b43180
  Built:            Thu Nov 18 00:21:59 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.12+azure-1
  GitCommit:        7b11cfaabd73bb80907dd23182b9347b4245eb5d
 runc:
  Version:          1.0.3
  GitCommit:        f46b6ba2c9314cfc8caae24a32ec5fe9ef1059fe
 docker-init:
  Version:          0.19.0
  GitCommit:        

Output of docker context show:
You can also run docker context inspect context-name to give us more details but don't forget to remove sensitive content.

[
    {
        "Name": "aws-ecs-dev",
        "Metadata": {
            "Description": "credentials read from environment",
            "Type": "ecs"
        },
        "Endpoints": {
            "docker": {
                "SkipTLSVerify": false
            },
            "ecs": {
                "CredentialsFromEnv": true
            }
        },
        "TLSMaterial": {},
        "Storage": {
            "MetadataPath": "/home/codespace/.docker/contexts/meta/75d7905ea8dcb3e4871c3a672258b7fc90bd6dfd64db587052f2e50a744f31c0",
            "TLSPath": "/home/codespace/.docker/contexts/tls/75d7905ea8dcb3e4871c3a672258b7fc90bd6dfd64db587052f2e50a744f31c0"
        }
    }
]

Output of docker info:

Command "info" not available in current context (aws-ecs-dev), you can use the "default" context to run this command

Additional environment details (AWS ECS, Azure ACI, local, etc.):

@nobiit
Copy link
Author

nobiit commented Jan 5, 2022

It works with default docker-compose

Starting drapia-backend_test_1 ... done
Attaching to drapia-backend_test_1
test_1  | PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
test_1  | HOSTNAME=2c013ec20817
test_1  | DMV_TOKEN=0xCC01d7a209576cB3FeA90F52D0E6599C014F01f3
test_1  | HOME=/root
drapia-backend_test_1 exited with code 0

@nobiit
Copy link
Author

nobiit commented Jan 5, 2022

@stale
Copy link

stale bot commented Jul 10, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Inactive issue label Jul 10, 2022
@keijinamba
Copy link

same

@stale
Copy link

stale bot commented Jul 21, 2022

This issue has been automatically marked as not stale anymore due to the recent activity.

@stale stale bot removed the stale Inactive issue label Jul 21, 2022
@stale
Copy link

stale bot commented May 22, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Inactive issue label May 22, 2023
@stale
Copy link

stale bot commented Jun 18, 2023

This issue has been automatically closed because it had not recent activity during the stale period.

@stale stale bot closed this as completed Jun 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale Inactive issue
Projects
None yet
Development

No branches or pull requests

2 participants