Skip to content

Commit

Permalink
Merge pull request keshavdv#300 from bdsoha/feature/cargo-cli
Browse files Browse the repository at this point in the history
🛠 Cargo fetching from CLI, closes keshavdv#299
  • Loading branch information
keshavdv authored Apr 19, 2023
2 parents 6a1e42d + a686a9d commit df5de7c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
ARG VARIANT="3.9"
FROM mcr.microsoft.com/vscode/devcontainers/python:dev-${VARIANT}-buster

FROM mcr.microsoft.com/vscode/devcontainers/universal
WORKDIR /app

RUN apt-get update && apt-get install -y ffmpeg netcat-openbsd
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
fi
echo version=${VERSION} >> $GITHUB_OUTPUT
echo tags=${TAGS} >> $GITHUB_OUTPUT
echo created=$(date -u +'%Y-%m-%dT%H:%M:%SZ') >> $GITHUB_OUTPUT
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
-
name: Set up QEMU
Expand Down
21 changes: 18 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,20 @@ ARG tag=${version}-alpine3.17

FROM python:${tag} as builder
WORKDIR /app

RUN apk add --update gcc g++ musl-dev rust cargo patchelf libc-dev linux-headers zlib-dev jpeg-dev
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true

RUN apk add --update \
cargo \
git \
gcc \
g++ \
jpeg-dev \
libc-dev \
linux-headers \
musl-dev \
patchelf \
rust \
zlib-dev

RUN pip install -U pip wheel setuptools maturin
COPY requirements.txt .
Expand All @@ -16,7 +28,10 @@ WORKDIR /app

ARG version

COPY --from=builder /usr/local/lib/python${version}/site-packages /usr/local/lib/python${version}/site-packages
COPY --from=builder \
/usr/local/lib/python${version}/site-packages \
/usr/local/lib/python${version}/site-packages

RUN apk add --update ffmpeg netcat-openbsd libusb-dev

COPY . .
Expand Down

0 comments on commit df5de7c

Please sign in to comment.