Skip to content

jasonjgardner/dxc-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DXC Docker

This Docker image provides the DirectX Compiler (DXC) with flexible version selection, allowing you to specify which version of DXC you want to use at runtime.

Features

Usage

Direct Usage

Run DXC with the default version:

docker run jasongardner/dxc [DXC_ARGS...]

Specify a different version at runtime:

docker run jasongardner/dxc --v=1.8.2405 [DXC_ARGS...]

Example: Compile a shader with a specific version:

docker run -v $(pwd):/work -w /work jasongardner/dxc --v=1.8.2405 -T ps_6_0 -E main shader.hlsl -Fo shader.bin

Using as a Base Image

You can use this image as a base in your own Dockerfile:

FROM jasongardner/dxc:latest
# dxc now in PATH

Or specify a version in your derived image:

FROM jasongardner/dxc:1.7

To use dxc in the next build stages:

FROM jasongardner/dxc:latest AS dxc
RUN dxc --version

# (Example base image)
FROM python:3.11-slim AS base

# Copy from previous step and add to path
COPY --from=dxc /opt/dxc /opt/dxc
ENV PATH="/opt/dxc/bin:$PATH"

Available Versions

The following DXC versions are supported:

Building the Image

To build the Docker image:

docker build -t jasongardner/dxc:latest .

You can specify a default DXC version during build time:

docker build --build-arg DXC_VERSION=1.7.2308 -t jasongardner/dxc:1.7 .

License

This Docker image is provided under the same license as the DirectX Shader Compiler. See the DirectX Shader Compiler repository for details.

About

Dockerized DirectX Compiler

Topics

Resources

License

Stars

Watchers

Forks

Packages