-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (60 loc) · 2.04 KB
/
docker-compose.yml
File metadata and controls
69 lines (60 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
version: "3.8"
services:
salesforce-cli:
image: salesforce/salesforcedx:latest-full
container_name: sf-dev-container
working_dir: /workspace
volumes:
- .:/workspace
- sf-cache:/home/node/.cache
- sf-config:/home/node/.config
environment:
- SFDX_DISABLE_DNS_CHECK=true
env_file:
- .env
stdin_open: true
tty: true
command: >
bash -c "
echo '🔧 Salesforce CLI Version:'
sf version
echo ''
echo '📁 Workspace contents:'
ls -la
echo ''
echo '🔑 Authenticating to Dev Hub with JWT...'
if sf org login jwt \
--username \"$$DEVHUB_USERNAME\" \
--jwt-key-file certs/server.key \
--client-id \"$$DEVHUB_CLIENT_ID\" \
--alias devhub \
--set-default-dev-hub \
--instance-url \"$$DEVHUB_INSTANCE_URL\"; then
echo ''
echo '✅ Authentication successful!'
sf org display --target-org devhub
echo ''
echo '🏢 Dev Hub limits:'
sf org limits --target-org devhub
echo ''
echo '🎉 Ready to work! You are now in the Salesforce CLI container.'
echo 'Try these commands:'
echo ' sf org list'
echo ' sf project generate --name test-project'
echo ' sf org create scratch --definition-file config/project-scratch-def.json --alias test-scratch'
echo ''
else
echo ''
echo '❌ Authentication failed! Check your credentials and try again.'
echo 'You can manually run:'
echo ' sf org login jwt --username \"$$DEVHUB_USERNAME\" --jwt-key-file certs/server.key --client-id \"$$DEVHUB_CLIENT_ID\" --alias devhub --set-default-dev-hub --instance-url \"$$DEVHUB_INSTANCE_URL\"'
echo ''
fi
echo 'Dropping into interactive bash shell...'
exec bash
"
volumes:
sf-cache:
driver: local
sf-config:
driver: local