-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
1 changed file
with
13 additions
and
7 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,17 +1,23 @@ | ||
# Use a minimal Ubuntu base image | ||
FROM ubuntu:latest | ||
|
||
# Install necessary dependencies (optional) | ||
RUN apt-get update && apt-get install -y libssl-dev | ||
ARG NU_VERSION=0.98.0 | ||
|
||
RUN apt-get update && apt-get install -y libssl-dev curl | ||
|
||
# Install Nushell | ||
RUN curl -L https://github.com/nushell/nushell/releases/download/${NU_VERSION}/nu-${NU_VERSION}-x86_64-unknown-linux-gnu.tar.gz | \ | ||
tar -xz -C /usr/bin --strip-components=1 nu-${NU_VERSION}-x86_64-unknown-linux-gnu/nu && \ | ||
mkdir -p /root/.config/nushell && nu -c "config nu --default" > /root/.config/nushell/config.nu && nu -c "config env --default" > /root/.config/nushell/env.nu | ||
|
||
# Install websocat | ||
RUN curl -L -o /usr/bin/websocat https://github.com/vi/websocat/releases/download/v1.13.0/websocat_max.x86_64-unknown-linux-musl && \ | ||
chmod +x /usr/bin/websocat | ||
|
||
# Create a directory to store the Rust binary | ||
WORKDIR /app | ||
|
||
# Copy the release binary from the build output | ||
COPY target/release/xs /usr/local/bin/xs | ||
|
||
# Expose the port that `xs serve` will use | ||
EXPOSE 8080 | ||
|
||
# Run the CLI tool in serve mode | ||
CMD ["xs", "serve", "/app/store"] | ||
|