Skip to content

Commit

Permalink
基础景象
Browse files Browse the repository at this point in the history
  • Loading branch information
yangfanplatform committed Sep 22, 2023
1 parent ed0a798 commit 6351aec
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,23 @@ env:


jobs:
server:
python-chrome:
name: Building a python chrome image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to Docker Container Registry
uses: docker/login-action@v1
with:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push python chrome image
run: |
docker build -t server -f base/python-chrome/Dockerfile .
docker tag python ${{ env.REGISTRY }}python:3.10.0.chrome
docker push ${{ env.REGISTRY }}python:3.10.0.chrome
python:
name: Building a python image
runs-on: ubuntu-latest
steps:
Expand All @@ -23,9 +39,6 @@ jobs:
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push python image
run: |
docker build -t server -f base/Dockerfile .
docker tag python ${{ env.REGISTRY }}python:${{ env.IMAGE_TAG }}
docker push ${{ env.REGISTRY }}python:${{ env.IMAGE_TAG }}
docker build -t server -f base/python/Dockerfile .
docker tag python ${{ env.REGISTRY }}python:3.10.0
docker push ${{ env.REGISTRY }}python:3.10.0
3 changes: 1 addition & 2 deletions base/Dockerfile → base/python-chrome/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,4 @@ RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.d
RUN dpkg -i google-chrome-stable_current_amd64.deb
RUN rm google-chrome-stable_current_amd64.deb

RUN /bin/sh -c "cat >> /etc/resolv.conf << 'EOF'\n nameserver 223.6.6.6\n EOF"
RUN /bin/sh -c "cat >> /etc/resolv.conf << 'EOF'\n nameserver 8.8.8.8\n EOF"

13 changes: 13 additions & 0 deletions base/python/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM python:3.10-slim

ENV TZ=Asia/Shanghai
RUN python3 -m venv ~/.hrp/venv
RUN python3 -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple \
&& pip3 install funppy -i https://pypi.tuna.tsinghua.edu.cn/simple


# 安装Chrome的依赖
RUN apt-get update && apt-get install -y \
vim


0 comments on commit 6351aec

Please sign in to comment.