-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile_alpine-python3
68 lines (58 loc) · 1.43 KB
/
Dockerfile_alpine-python3
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# BASE_IMAGE - arg is the tag of the container built from Dockerfile_alpine
ARG BASE_IMAGE
# Builder
FROM $BASE_IMAGE as builder
ENV VPACK_VERSION=0.1.33
ADD modules/tmp/* /tmp/
RUN apk add --no-cache \
cmake \
g++ \
gcc \
make \
unzip && \
#
# VelocityPack Install
unzip -q -d /tmp/ /tmp/velocypack-${VPACK_VERSION}.zip && \
cd /tmp/velocypack-${VPACK_VERSION} && \
mkdir -p ./build && \
(cd build && cmake .. && make install DESTDIR=/opt/velocitypack)
# Base Image
FROM $BASE_IMAGE
LABEL name="Base Alpine Python3" \
description="This is the Base Alpine Python3 with SB_Utils container for Screaming Bunny."
ENV PYTHONUNBUFFERED=0
COPY modules/tmp/ /tmp/
COPY --from=builder /opt/velocitypack /
# Package Installation
# Packages - https://pkgs.alpinelinux.org/packages
RUN apk add --no-cache libressl libstdc++ python3 && \
apk add --no-cache --virtual .build-deps \
cargo \
gcc \
g++ \
libffi-dev \
libressl-dev \
linux-headers \
musl-dev \
openssl-dev \
python3-dev \
yaml-dev && \
#
# Python PIP Install
python3 /tmp/get-pip.py && \
pip3 install --no-cache-dir --upgrade pip setuptools && \
#
# SB_Utils install
cd /tmp/sb_utils/root && \
pip3 install --no-cache-dir . && \
cd && \
#
# Cleanup
apk del --no-cache .build-deps && \
rm -rf /var/cache/apk/* *.tar.gz* /usr/src /root/.cache /root/.gnupg /tmp/* && \
#
# Check versions
python3 --version && \
pip3 --version && \
json-to-vpack --help && \
vpack-to-json --help