-
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
3 changed files
with
74 additions
and
1 deletion.
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,4 +1,4 @@ | ||
name: Push Docker image | ||
name: build logstash | ||
|
||
on: | ||
push: | ||
|
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: build python | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'python/**' | ||
jobs: | ||
deploy: | ||
name: 打包并上传python | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
# Add support for more platforms with QEMU (optional) | ||
# https://github.com/docker/setup-qemu-action | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
run: echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin | ||
- name: Build and push multi-platform Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./logstash | ||
file: ./logstash/Dockerfile | ||
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/python:3.9.18-alpine |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM python:3.9.18-alpine | ||
|
||
MAINTAINER sijinhui | ||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories | ||
RUN apk update && apk add vim | ||
RUN apk add --no-cache \ | ||
bash \ | ||
make \ | ||
curl \ | ||
libstdc++ \ | ||
&& apk add --no-cache \ | ||
--virtual .build-deps \ | ||
gcc \ | ||
musl-dev \ | ||
linux-headers \ | ||
g++ \ | ||
make \ | ||
libxslt-dev \ | ||
python3-dev \ | ||
libc-dev \ | ||
libressl-dev \ | ||
libffi-dev \ | ||
&& ln -s /usr/include/locale.h /usr/include/xlocale.h \ | ||
&& pip install --no-cache-dir --upgrade pip \ | ||
&& pip install --no-cache-dir pandas \ | ||
&& apk --purge del .build-deps \ | ||
&& find / -type f -iname \*.pyc -delete \ | ||
&& find / -type f -iname \*.pyo -delete \ | ||
&& find / -type f -iname __pycache__ -delete \ | ||
|
||
RUN apk add tzdata \ | ||
apk add --virtual .build-deps build-base python3-dev libffi-dev openssl-dev \ | ||
apk add gcc musl-dev python3-dev libffi-dev openssl-dev cargo \ | ||
apk add cython \ | ||
apk add py3-yaml | ||
|
||
RUN rm -rf /var/cache/apk/* | ||
|