-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add VHS to Docker build to enable recording the demo animation. There is a known performance issue caused by CPU requirements exceed current machine. This causes frames to be dropped which results in the video playback being faster than normal.
- Loading branch information
1 parent
30b5445
commit 53c0baf
Showing
3 changed files
with
43 additions
and
8 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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# syntax=docker/dockerfile:1.4 | ||
|
||
FROM golang:1.19.4-alpine3.17 as base | ||
WORKDIR /usr/src/app | ||
RUN --mount=type=cache,target=/var/cache/apk \ | ||
|
@@ -43,4 +45,34 @@ RUN git config --global user.email "[email protected]" && \ | |
git config --global user.name "Your Name" && \ | ||
git init | ||
|
||
ENTRYPOINT ["committed"] | ||
FROM mikelorant/vhs as vhs | ||
|
||
RUN apt-get -y install git | ||
|
||
COPY --from=build /usr/local/bin/committed /usr/local/bin | ||
|
||
ENV VHS_NO_SANDBOX="true" | ||
ENV TERM=xterm-256color | ||
|
||
RUN git config --global user.email "[email protected]" && \ | ||
git config --global user.name "John Doe" && \ | ||
git init | ||
|
||
RUN mkdir -p /root/.config/committed | ||
COPY <<EOF /root/.config/committed/config.yaml | ||
view: | ||
compatibility: ttyd | ||
ignoreGlobalAuthor: true | ||
|
||
authors: | ||
- name: John Doe | ||
email: [email protected] | ||
- name: John Doe | ||
email: [email protected] | ||
- name: John Doe | ||
email: [email protected] | ||
EOF | ||
|
||
COPY scripts ./ | ||
|
||
ENTRYPOINT ["bash"] |
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 |
---|---|---|
|
@@ -2,13 +2,7 @@ | |
# - Use ttyd 1.7.2 which resolves missing cursor. | ||
# - Use current build of vhs to resolve width issues. | ||
# - Modify high-voltage with basic version. (emoji.yaml) | ||
# - Copy $HOME/.config/committed/config.yaml to current directory. | ||
# - Modify config to use: | ||
# view.compatibility = ttyd (config.yaml) | ||
# authors: | ||
# - name: John Doe | ||
# email: [email protected] | ||
# - Comment out user in Git config. (~/.gitconfig) | ||
# - Copy scripts/demo.yaml to current directory. | ||
# - Build release: go build -tags release | ||
|
||
Output demo.gif | ||
|
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 @@ | ||
view: | ||
compatibility: ttyd | ||
ignoreGlobalAuthor: true | ||
|
||
authors: | ||
- name: John Doe | ||
email: [email protected] | ||
- name: John Doe | ||
email: [email protected] |