Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use alpine for images #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions build-env/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
# Build context: parent directory
FROM rust:slim-bullseye as create-build-env
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc g++ cmake python3 make
FROM alpine:edge as create-build-env
RUN apk add gcc g++ cmake python3 make rust
RUN apk add cargo
COPY . /pps
WORKDIR /pps
ENV PYTHONUNBUFFERED=1
RUN python3 ./build-env/make.py --out /build-env

FROM rust:slim as build-pps
FROM alpine:edge as build-pps
RUN apk add rust
RUN apk add cargo
COPY . /pps
WORKDIR /pps
RUN cargo install --path cli

FROM ubuntu:focal
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc g++ cmake python3 make
FROM alpine:edge
RUN apk add gcc g++ cmake python3 make
WORKDIR /usr/local/bin
COPY --from=build-pps /usr/local/cargo/bin/pps-cli pps-cli
COPY --from=build-pps /root/.cargo/bin/pps-cli pps-cli
COPY --from=create-build-env /build-env /opt/pps-build-env
ENV JJS_PATH=/opt/pps-build-env