Phala Network Docs
  • Home
    • 👾Phala Network Docs
  • Overview
    • ⚖️Phala Network
      • 💎Phala Cloud
      • 🥷Dstack
      • 🔐GPU TEE
    • 💎PHA Token
      • 🪙Introduction
      • 👐Delegation
        • Delegate to StakePool
        • What is Vault
        • What is Share
        • WrappedBalances & W-PHA
        • Examples of Delegation
        • Use Phala App to Delegate
        • Estimate Your Reward
      • 🗳️Governance
        • Governance Mechanism
        • Join the Council
        • Voting for Councillors
        • Apply for Project Funding
        • Phala Treasury
        • Phala Governance
        • Setting Up an Account Identity
  • Phala Cloud
    • 🚀Getting Started
      • Create Your Phala Cloud Account
      • Your First CVM Deployment
      • Explore Templates
        • Launch an Eliza Agent
        • Start from Template
    • 🪨TEEs, Attestation & Zero Trust Security
      • Attestation
      • Security Architecture
    • 🥷Phala Cloud User Guides
      • Deploy and Manage CVMs
        • Deploy CVM with Docker Compose
        • Set Secure Environment Variables
        • Deploy Private Docker Image to CVM
        • Debugging and Analyzing Logs
          • Check Logs
          • Private Log Viewer
          • Debug Your Application
        • Application Scaling & Resource Management
        • Upgrade Application
        • Deployment Cheat Sheet
      • Building with TEE
        • Access Your Applications
        • Expose Service Port
        • Setting Up Custom Domain
        • Secure Access Database
        • Create Crypto Wallet
        • Generate Remote Attestation
      • Advanced Deployment Options
        • Deploy CVM with Phala Cloud CLI
        • Deploy CVM with Phala Cloud API
        • Setup a CI/CD Pipeline
    • 🚢Be Production Ready
      • CI/CD Automation
        • Setup a CI/CD Pipeline
      • Production Checklist
      • Troubleshooting Guide
      • Glossary
    • 🔒Use Cases
      • TEE with AI
      • TEE with FHE and MPC
      • TEE with ZK and ZKrollup
    • 📋References
      • Phala Cloud CLI Reference
        • phala
          • auth
          • cvms
          • docker
          • simulator
      • Phala Cloud API & SDKs
        • API Endpoints & Examples
        • SDKs and Integrations
      • Phala Cloud Pricing
    • ❓FAQs
  • Dstack
    • Overview
    • Getting Started
    • Hardware Requirements
    • Design Documents
      • Decentralized Root-of-Trust
      • Key Management Service
      • Zero Trust HTTPs (TLS)
    • Acknowledgement
  • LLM in GPU TEE
    • 👩‍💻Host LLM in GPU TEE
    • 🔐GPU TEE Inference API
    • 🏎️GPU TEE Benchmark
  • Tech Specs
    • ⛓️Blockchain
      • Blockchain Entities
      • Cluster of Workers
      • Secret Key Hierarchy
  • References
    • 🔐Setting Up a Wallet on Phala
      • Acquiring PHA
    • 🌉SubBridge
      • Cross-chain Transfer
      • Supported Assets
      • Asset Integration Guide
      • Technical Details
    • 👷Community Builders
    • 🤹Hackathon Guides
      • ETHGlobal Singapore
      • ETHGlobal San Francisco
      • ETHGlobal Bangkok
    • 🤯Advanced Topics
      • Cross Chain Solutions
      • System Contract and Drivers
      • Run Local Testnet
      • SideVM
    • 🆘Support
      • Available Phala Chains
      • Resource Limits
      • Transaction Costs
      • Compatibility Matrix
      • Block Explorers
      • Faucet
    • ⁉️FAQ
  • Compute Providers
    • 🙃Basic Info
      • Introduction
      • Gemini Tokenomics (Worker Rewards)
      • Budget balancer
      • Staking Mechanism
      • Requirements in Phala
      • Confidence Level & SGX Function
      • Rent Hardware
      • Error Summary
    • 🦿Run Workers on Phala
      • Solo Worker Deployment
      • PRBv3 Deployment
      • Using PRBv3 UI
      • PRB Worker Deployment
      • Switch Workers from Solo to PRB Mode
      • Headers-cache deployment
      • Archive node deployment
    • 🛡️Gatekeeper
      • Collator
      • Gatekeeper
  • Web Directory
    • Discord
    • GitHub
    • Twitter
    • YouTube
    • Forum
    • Medium
    • Telegram
Powered by GitBook
LogoLogo

Participate

  • Compute Providers
  • Node
  • Community
  • About Us

Resources

  • Technical Whitepaper
  • Token Economics
  • Docs
  • GitHub

More

  • Testnet
  • Explorer
  • Careers
  • Responsible Disclosure

COPYRIGHT © 2024 PHALA.LTD ALL RIGHTS RESERVED. May Phala be with you!

On this page
  • Command: docker
  • Description
  • Examples

Was this helpful?

Edit on GitHub
  1. Phala Cloud
  2. References
  3. Phala Cloud CLI Reference
  4. phala

docker

Command: docker

Syntax

phala docker [options] [command]

Description

The phala docker command is used to your Docker images. Using this tool is optional, and it is okay to use the native docker CLI instead.

Usage: phala docker [options] [command]

Login to Docker Hub and manage Docker images

Options:
  -h, --help          display help for command

Commands:
  login [options]     Login to Docker Hub
  build [options]     Build a Docker image
  push [options]      Push a Docker image to Docker Hub
  generate [options]  Generate a Docker Compose file
  help [command]      display help for command

Examples

  • Display help

phala docker --help
  • Login to Docker

Note that the login will use the existing docker login session and will not require another login attempt.

phala docker login --username hashwarlock
Example Output
⟳ Logging in to Docker Hub as hashwarlock... ✓: Logged in as hashwarlock
✓ hashwarlock is logged in to Docker Hub
  • Build a Dockerfile

Note: During the build process, the logs of the build will be output to a file in the root directory of your project in the .phala-cloud/logs/folder.

phala docker build
Example Output
✔ Enter the Docker image name: elizas
✔ Enter the Docker image tag: v0.0.1o
✔ Default Dockerfile found at ~/eliza/Dockerfile                                                           │
✔ Enter the path to your Dockerfile: (Dockerfile)
Latest 10 lines (full log at ~/eliza/.phala-cloud/logs/elizas-build-2025-03-14T20-43-16-210Z.log):
--------------------------------------------------
#30 [builder  3/17] RUN apt-get update &&     apt-get install -y curl git python3 make g++ unzip build-essential nodejs &&     apt-get clean &&     rm -rf /var/lib/apt/lists/*
#30 CACHED
#31 [stage-1 13/13] COPY --from=builder /app/scripts ./scripts
#31 CACHED
#32 exporting to image
#32 exporting layers done
#32 writing image sha256:a74b8e777075afd7b09d2107bcbc26cc1f602d81a9cf6491d5d4476cad2a6da4 done
#32 naming to docker.io/hashwarlock/elizas:v0.0.1o done
#32 DONE 0.0s
View build details: docker-desktop://dashboard/build/orbstack/orbstack/gd75239yegh0twa3zkuq1macb

Operation completed. Full log available at: ~eliza/.phala-cloud/logs/elizas-build-2025-03-14T20-43-16-210Z.log
✓: Docker image hashwarlock/elizas:v0.0.1o built successfully
✓ Docker image hashwarlock/elizas:v0.0.1o built successfully
  • Push Docker Image to Docker Hub

phala docker push --image hashwarlock/elizas:v0.0.1o
Example Output
Latest 10 lines (full log at ~/eliza/.phala-cloud/logs/elizas-push-2025-03-14T21-23-14-847Z.log):
--------------------------------------------------
1de7295ab7c5: Layer already exists
90e8688db369: Layer already exists
25d07e7c0ece: Layer already exists
bcba87ec50fa: Layer already exists
ba2b458ab48c: Layer already exists
2ccdaba7f460: Layer already exists
5bcbf42c7074: Layer already exists
7ff9bfab192e: Layer already exists
3e6ae445f28c: Layer already exists
c0f1022b22a9: Layer already exists
v0.0.1o: digest: sha256:1fa0685e564d67a451f4e7ce060e95da5ad740d937e69202fcc8957468a66a08 size: 3876

Operation completed. Full log available at: ~/eliza/.phala-cloud/logs/elizas-push-2025-03-14T21-23-14-847Z.log
✓: Docker image hashwarlock/elizas:v0.0.1o pushed successfully
✓ Docker image hashwarlock/elizas:v0.0.1o pushed successfully
  • Generate a Basic Docker Compose File

phala docker generate --image elizas --tag v0.0.1o -e .env
Example Output

Command Output:

✔ File ~/eliza/docker-compose.yml already exists. Overwrite? No
✔ Enter alternative output path: ~/eliza/docker-generated-compose.yml
ℹ Generating Docker Compose file for elizas:v0.0.1o using env file: .env
✓ Backup of docker compose file created at: .phala-cloud/compose/elizas-v0.0.1o-tee-compose.yaml
✓ Docker Compose file generated successfully: ~/eliza/docker-generated-compose.yml

Generated File:

version: '3.8'
services:
  app:
    image: hashwarlock/elizas:v0.0.1o
    container_name: app
    volumes:
      - /var/run/tappd.sock:/var/run/tappd.sock
    environment:
      - OPENAI_API_KEY=${OPENAI_API_KEY}
      - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
      - SERVER_PORT=${SERVER_PORT}
      - POSTGRES_URL=${POSTGRES_URL}
      - EVM_CHAINS=${EVM_CHAINS}
      - BIRDEYE_API_KEY=${BIRDEYE_API_KEY}
      - COMMUNITY_MANAGER_DISCORD_APPLICATION_ID=${COMMUNITY_MANAGER_DISCORD_APPLICATION_ID}
      - COMMUNITY_MANAGER_DISCORD_API_TOKEN=${COMMUNITY_MANAGER_DISCORD_API_TOKEN}
      - SOCIAL_MEDIA_MANAGER_DISCORD_APPLICATION_ID=${SOCIAL_MEDIA_MANAGER_DISCORD_APPLICATION_ID}
      - SOCIAL_MEDIA_MANAGER_DISCORD_API_TOKEN=${SOCIAL_MEDIA_MANAGER_DISCORD_API_TOKEN}
      - LIAISON_DISCORD_APPLICATION_ID=${LIAISON_DISCORD_APPLICATION_ID}
      - LIAISON_DISCORD_API_TOKEN=${LIAISON_DISCORD_API_TOKEN}
      - PROJECT_MANAGER_DISCORD_APPLICATION_ID=${PROJECT_MANAGER_DISCORD_APPLICATION_ID}
      - PROJECT_MANAGER_DISCORD_API_TOKEN=${PROJECT_MANAGER_DISCORD_API_TOKEN}
      - DEV_SUPPORT_DISCORD_APPLICATION_ID=${DEV_SUPPORT_DISCORD_APPLICATION_ID}
      - DEV_SUPPORT_DISCORD_API_TOKEN=${DEV_SUPPORT_DISCORD_API_TOKEN}
      - INVESTMENT_MANAGER_DISCORD_APPLICATION_ID=${INVESTMENT_MANAGER_DISCORD_APPLICATION_ID}
      - INVESTMENT_MANAGER_DISCORD_API_TOKEN=${INVESTMENT_MANAGER_DISCORD_API_TOKEN}
    restart: always

PreviouscvmsNextsimulator

Last updated 2 months ago

Was this helpful?

📋