0a1b531116
The EnableMouseCapture from Crossterm was too broad, by only enabling a subject of the events, 1) performance is improvedand 2) and intermittent bug where mouse events were output to stdout has been removed
31 lines
1.7 KiB
Plaintext
31 lines
1.7 KiB
Plaintext
#############
|
|
## Runtime ##
|
|
#############
|
|
FROM scratch
|
|
|
|
# Set env that we're running in a container, so that the application can sleep for 250ms at start
|
|
ENV OXKER_RUNTIME=container
|
|
|
|
# Copy application binary from builder image
|
|
COPY ./target/x86_64-unknown-linux-musl/release/oxker /app/
|
|
|
|
# Run the application
|
|
# this is used in the application itself, to stop itself show when running from a docker container, so DO NOT EDIT
|
|
ENTRYPOINT [ "/app/oxker"]
|
|
|
|
# Dev build for testing
|
|
# docker build -t oxker_dev -f containerised/Dockerfile_dev . && docker run --rm -it --volume /var/run/docker.sock:/var/run/docker.sock:ro oxker_dev
|
|
|
|
# Dev build one liner, x86 host
|
|
# docker image prune -a; cargo build --release --target x86_64-unknown-linux-musl && docker build -t oxker_dev -f containerised/Dockerfile_dev . && docker run --rm -it --volume /var/run/docker.sock:/var/run/docker.sock:ro oxker_dev
|
|
|
|
## One liner to build musl program, build docker image, then execute the image
|
|
# cargo build --release --target x86_64-unknown-linux-musl && docker build -t oxker_dev -f containerised/Dockerfile . && docker run --rm -it --volume /var/run/docker.sock:/var/run/docker.sock:ro oxker_dev
|
|
|
|
# Build production version
|
|
# docker build --platform linux/arm/v6 --platform linux/arm64 --platform linux/amd64 -t oxker_dev -f containerised/Dockerfile . && docker run --rm -it --volume /var/run/docker.sock:/var/run/docker.sock:ro oxker_dev
|
|
|
|
# Buildx command to build musl version for all three platforms, should probably be executed in create_release
|
|
# docker buildx create --use
|
|
# docker buildx build --platform linux/arm/v6,linux/arm64,linux/amd64 -t oxker_dev_all -o type=tar,dest=/tmp/oxker_dev_all.tar -f containerised/Dockerfile .
|