Commit a6bc7621 authored by 张宇's avatar 张宇

init

parent a99cbcfb
# FROM ccr.ccs.tencentyun.com/gm-base/gm-alpine:v1.3
FROM alpine:latest
MAINTAINER wph [wangpenghong@igengmei.com]
WORKDIR /srv/apps/drone-test/
COPY ./requirements.txt /tmp
RUN apk add --no-cache --virtual .build-deps \
bzip2-dev \
coreutils \
dpkg-dev dpkg \
expat-dev \
findutils \
gcc \
gdbm-dev \
libc-dev \
libffi-dev \
libnsl-dev \
libressl-dev \
libtirpc-dev \
linux-headers \
make \
ncurses-dev \
pax-utils \
readline-dev \
sqlite-dev \
tcl-dev \
tk \
tk-dev \
xz-dev \
zlib-dev \
# 业务相关依赖和安装工具
linux-headers \
python3-dev \
librdkafka-dev \
mariadb-client \
mariadb-dev \
git \
openssh \
bash \
build-base \
\
# 取消ssh第一次链接的确认
&& echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config \
&& apk add --no-cache mariadb-connector-c-dev libxml2-dev libxslt-dev librdkafka-dev \
&& apk add --no-cache jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev \
\
&& git clone https://github.com/pyenv/pyenv.git ~/.pyenv \
&& echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.ashrc \
&& echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.ashrc \
&& echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.ashrc \
&& source ~/.ashrc \
\
&& git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv \
&& echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.ashrc \
\
&& source ~/.ashrc \
\
&& pyenv install 3.8.1 \
&& pyenv virtualenv 3.8.1 drone-test \
&& pyenv activate drone-test \
\
&& pip install --no-cache-dir -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com -r /tmp/requirements.txt \
&& mkdir -p /data/log/drone-test/apps
COPY . /srv/apps/drone-test/
WORKDIR /srv/apps/drone-test/
version: '2'
services:
drone-test:
build: .
ports:
- "8000:8000"
# volumes:
# - "/Users/mike/Documents/zzzGM/drone-test:/srv/apps/drone-test"
command: /bin/bash
\ No newline at end of file
kind: pipeline
name: drone-test
steps:
# - name: compile
# image: node:12-alpine
# commands:
# - npm install
# - npm run build
# - name: test
# image: node:12-alpine
# commands:
# - npm install --dev
# - npm run lint
# - npm test
- name: build
image: plugins/docker
settings:
registry: ccr.ccs.tencentyun.com
username: 100006655717
password: 541882233Zy
repo: ccr.ccs.tencentyun.com/mike-test/drone-test
tags:
- latest
- v0.0.1-test
- {{DRONE_COMMIT}}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment