-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
88a51f1
commit 02d9f12
Showing
8 changed files
with
144 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
**/node_modules | ||
**/dist | ||
|
||
# Rush files | ||
common/temp/** | ||
package-deps.json | ||
|
||
# tsc incremental build files | ||
**/*.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
common/changes/tmlanguage-generator/feature-docker_2021-11-10-23-04.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "tmlanguage-generator", | ||
"comment": "", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "tmlanguage-generator" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -------------------------------- | ||
# Build compiler | ||
# -------------------------------- | ||
FROM node:16-alpine3.12 as builder | ||
|
||
COPY . /app | ||
|
||
WORKDIR /app | ||
RUN npm install -g @microsoft/rush | ||
RUN rush install | ||
RUN rush rebuild | ||
|
||
WORKDIR /app/packages/compiler | ||
RUN npm pack | ||
|
||
# -------------------------------- | ||
# Setup final image | ||
# -------------------------------- | ||
FROM node:16-alpine3.12 | ||
|
||
COPY --from=builder /app/packages/compiler/*.tgz /tmp/compiler.tgz | ||
|
||
RUN npm install -g /tmp/compiler.tgz && rm /tmp/compiler.tgz | ||
|
||
ENTRYPOINT [ "cadl" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Use cadl via docker | ||
|
||
Image: `azsdkengsys.azurecr.io/cadl` | ||
|
||
Tags: | ||
|
||
- Lastest from master: `alpine`, `latest` | ||
|
||
## Usage | ||
|
||
```bash | ||
docker run \ | ||
-v "${pwd}:/wd" --workdir="/wd" \ | ||
-t azsdkengsys.azurecr.io/cadl \ | ||
# ... cadl args ... | ||
``` | ||
|
||
**For usage in powershell replace `\` with `` ` ``** | ||
|
||
### Install dependencies | ||
|
||
```bash | ||
docker run -v "${pwd}:/wd" --workdir="/wd" -t azsdkengsys.azurecr.io/cadl install | ||
``` | ||
|
||
### Compile | ||
|
||
```bash | ||
docker run -v "${pwd}:/wd" --workdir="/wd" -t azsdkengsys.azurecr.io/cadl compile . | ||
``` | ||
|
||
### Init a new project | ||
|
||
```bash | ||
docker run -v "${pwd}:/wd" --workdir="/wd" -t azsdkengsys.azurecr.io/cadl init | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters