FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cli/Dockerfile-rust at main · fastly/cli · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
fastly
/
cli
Public
Notifications
You must be signed in to change notification settings
Fork
80
Star
162
Code
Issues
49
Pull requests
6
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
cli
/
Dockerfile-rust
Copy path
More file actions
More file actions
Latest commit
History
History
History
29 lines (24 loc) · 1.55 KB
Breadcrumbs
cli
/
Dockerfile-rust
Copy path
File metadata and controls
29 lines (24 loc) · 1.55 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM rust:latest
LABEL maintainer="Fastly OSS <oss@fastly.com>"
ENV RUSTUP_TOOLCHAIN=$RUST_VERSION
RUN rustup target add wasm32-wasip1 \
&& apt-get update && apt-get install -y curl jq && apt-get -y clean && rm -rf /var/lib/apt/lists/* \
&& cargo install wasm-tools --locked \
&& export FASTLY_CLI_VERSION=$(curl -s https://api.github.com/repos/fastly/cli/releases/latest | jq -r .tag_name | cut -d 'v' -f 2) \
GOARCH=$(dpkg --print-architecture) \
&& curl -sL "https://github.com/fastly/cli/releases/download/v${FASTLY_CLI_VERSION}/fastly_v${FASTLY_CLI_VERSION}_linux-$GOARCH.tar.gz" -o fastly.tar.gz \
&& curl -sL "https://github.com/fastly/cli/releases/download/v${FASTLY_CLI_VERSION}/fastly_v${FASTLY_CLI_VERSION}_SHA256SUMS" -o sha256sums \
&& dlsha=$(shasum -a 256 fastly.tar.gz | cut -d " " -f 1) && expected=$(cat sha256sums | awk -v pat="$dlsha" '$0~pat' | cut -d " " -f 1) \
&& if [ "$dlsha" != "$expected" ]; then echo "shasums don't match" && exit 1; fi \
&& tar -xzf fastly.tar.gz --directory /usr/bin && rm -f sha256sums fastly.tar.gz \
&& useradd -ms /bin/bash fastly
USER fastly
# Pre-install Viceroy so the image is self-contained (no download at runtime).
# Must run as the `fastly` user, since Viceroy installs into that user's config
# directory (where `compute serve` later looks for it).
RUN fastly compute install-tools
WORKDIR /app
ENTRYPOINT ["/usr/bin/fastly"]
CMD ["--help"]
# docker build -t fastly/cli/rust . -f ./Dockerfile-rust
# docker run -v $PWD:/app -it -p 7676:7676 fastly/cli/rust compute serve --addr="0.0.0.0:7676"
Back
|
FazBrowse Home
|
New Git URL