Skip to content
This repository was archived by the owner on Dec 12, 2022. It is now read-only.

Commit dbd7f9d

Browse files
committed
initial release
1 parent 23615c3 commit dbd7f9d

7 files changed

Lines changed: 361 additions & 0 deletions

File tree

.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.DS_Store
2+
.git
3+
.gitignore
4+
.editorconfig
5+
.github
6+
docker-compose.yml
7+
README.md
8+
test

.drone.yml

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
kind: pipeline
2+
type: docker
3+
name: build-test-build
4+
5+
platform:
6+
os: linux
7+
arch: amd64
8+
9+
trigger:
10+
event:
11+
- push
12+
13+
steps:
14+
- name: build test image
15+
image: plugins/docker:linux-amd64
16+
settings:
17+
username:
18+
from_secret: DOCKERHUB_USERNAME
19+
password:
20+
from_secret: DOCKERHUB_PASSWORD
21+
repo: fabiodcorreia/base-python
22+
auto_tag: true
23+
auto_tag_suffix: test
24+
purge: true
25+
26+
---
27+
kind: pipeline
28+
type: docker
29+
name: docker-test
30+
31+
platform:
32+
os: linux
33+
arch: amd64
34+
35+
trigger:
36+
status:
37+
- success
38+
39+
steps:
40+
- name: base_python_test
41+
image: fabiodcorreia/base-python:test
42+
# ports: [ 80 ]
43+
detach: true
44+
pull: always
45+
environment:
46+
PUID: "1000"
47+
PGID: "1000"
48+
49+
#- name: test image
50+
# image: python:2.7.18-alpine
51+
# commands:
52+
# - sleep 60
53+
# - sh ./test/start.sh
54+
55+
depends_on:
56+
- build-test-build
57+
58+
---
59+
kind: pipeline
60+
type: docker
61+
name: docker-amd64
62+
63+
platform:
64+
os: linux
65+
arch: amd64
66+
67+
trigger:
68+
event:
69+
- tag
70+
71+
steps:
72+
- name: build and publish amd64
73+
image: plugins/docker:linux-amd64
74+
settings:
75+
build_args:
76+
- BUILD_DATE=${DRONE_BUILD_FINISHED}
77+
- VERSION=${DRONE_TAG}
78+
username:
79+
from_secret: DOCKERHUB_USERNAME
80+
password:
81+
from_secret: DOCKERHUB_PASSWORD
82+
repo: fabiodcorreia/base-python
83+
auto_tag: true
84+
auto_tag_suffix: amd64
85+
purge: true
86+
87+
---
88+
kind: pipeline
89+
type: docker
90+
name: docker-arm64
91+
92+
platform:
93+
os: linux
94+
arch: arm64
95+
96+
trigger:
97+
event:
98+
- tag
99+
100+
steps:
101+
- name: build and publish arm64v8
102+
image: plugins/docker:linux-arm64
103+
settings:
104+
build_args:
105+
- BUILD_DATE=${DRONE_BUILD_FINISHED}
106+
- VERSION=${DRONE_TAG}
107+
username:
108+
from_secret: DOCKERHUB_USERNAME
109+
password:
110+
from_secret: DOCKERHUB_PASSWORD
111+
repo: fabiodcorreia/base-python
112+
auto_tag: true
113+
auto_tag_suffix: arm64v8
114+
purge: true
115+
116+
---
117+
kind: pipeline
118+
type: docker
119+
name: docker-arm32
120+
121+
platform:
122+
os: linux
123+
arch: arm
124+
125+
trigger:
126+
event:
127+
- tag
128+
129+
steps:
130+
- name: build and publish arm32v7
131+
image: plugins/docker:linux-arm
132+
settings:
133+
build_args:
134+
- BUILD_DATE=${DRONE_BUILD_FINISHED}
135+
- VERSION=${DRONE_TAG}
136+
username:
137+
from_secret: DOCKERHUB_USERNAME
138+
password:
139+
from_secret: DOCKERHUB_PASSWORD
140+
repo: fabiodcorreia/base-python
141+
auto_tag: true
142+
auto_tag_suffix: arm32v7
143+
purge: true
144+
145+
---
146+
kind: pipeline
147+
type: docker
148+
name: docker-manifest
149+
150+
platform:
151+
os: linux
152+
arch: amd64
153+
154+
trigger:
155+
event:
156+
- tag
157+
158+
depends_on:
159+
- docker-amd64
160+
- docker-arm64
161+
- docker-arm32
162+
163+
steps:
164+
- name: manifest
165+
pull: always
166+
image: plugins/manifest
167+
settings:
168+
auto_tag: true
169+
ignore_missing: true
170+
spec: manifest.tmpl
171+
username:
172+
from_secret: DOCKERHUB_USERNAME
173+
password:
174+
from_secret: DOCKERHUB_PASSWORD
175+
- name: manifest latest
176+
pull: always
177+
image: plugins/manifest
178+
settings:
179+
tag: latest
180+
ignore_missing: true
181+
spec: manifest.tmpl
182+
username:
183+
from_secret: DOCKERHUB_USERNAME
184+
password:
185+
from_secret: DOCKERHUB_PASSWORD

.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
insert_final_newline = true
6+
indent_style = space
7+
indent_size = 2
8+
trim_trailing_whitespace = true
9+
end_of_line = lf
10+
11+
[Makefile]
12+
indent_style = tab
13+
indent_size = 4
14+
15+
[*.mk]
16+
indent_style = tab
17+
indent_size = 4
18+
trim_trailing_whitespace = false
19+
20+
[*.go]
21+
indent_style = tab
22+
indent_size = 4

.gitignore

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,linux
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,macos,linux
3+
4+
### Linux ###
5+
*~
6+
7+
# temporary files which can be created if a process still has a handle open of a deleted file
8+
.fuse_hidden*
9+
10+
# KDE directory preferences
11+
.directory
12+
13+
# Linux trash folder which might appear on any partition or disk
14+
.Trash-*
15+
16+
# .nfs files are created when an open file is removed but is still being accessed
17+
.nfs*
18+
19+
### macOS ###
20+
# General
21+
.DS_Store
22+
.AppleDouble
23+
.LSOverride
24+
25+
# Icon must end with two \r
26+
Icon
27+
28+
# Thumbnails
29+
._*
30+
31+
# Files that might appear in the root of a volume
32+
.DocumentRevisions-V100
33+
.fseventsd
34+
.Spotlight-V100
35+
.TemporaryItems
36+
.Trashes
37+
.VolumeIcon.icns
38+
.com.apple.timemachine.donotpresent
39+
40+
# Directories potentially created on remote AFP share
41+
.AppleDB
42+
.AppleDesktop
43+
Network Trash Folder
44+
Temporary Items
45+
.apdisk
46+
47+
### VisualStudioCode ###
48+
.vscode/*
49+
!.vscode/settings.json
50+
!.vscode/tasks.json
51+
!.vscode/launch.json
52+
!.vscode/extensions.json
53+
54+
### VisualStudioCode Patch ###
55+
# Ignore all local history of files
56+
.history
57+
58+
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,linux

Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM fabiodcorreia/base-alpine:1.0.0
2+
3+
ARG BUILD_DATE
4+
ARG VERSION
5+
LABEL build_version="version:- ${VERSION} Build-date:- ${BUILD_DATE}"
6+
LABEL maintainer="fabiodcorreia"
7+
8+
RUN \
9+
echo "**** install runtime packages ****" && \
10+
apk add --no-cache \
11+
py3-pip \
12+
python3 && \
13+
echo "**** install pip packages ****" && \
14+
pip install --no-cache-dir -U pip && \
15+
pip install -U \
16+
virtualenv && \
17+
echo "**** clean up ****" && \
18+
rm -rf \
19+
/root/.cache \
20+
/tmp/*

package_versions.txt

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
alpine-baselayout-3.2.0-r7
2+
alpine-keys-2.2-r0
3+
apk-tools-2.10.5-r1
4+
bash-5.0.17-r0
5+
busybox-1.31.1-r19
6+
ca-certificates-20191127-r4
7+
ca-certificates-bundle-20191127-r4
8+
coreutils-8.32-r0
9+
expat-2.2.9-r1
10+
gdbm-1.13-r1
11+
libacl-2.2.53-r0
12+
libattr-2.4.48-r0
13+
libbz2-1.0.8-r1
14+
libc-utils-0.7.2-r3
15+
libcrypto1.1-1.1.1g-r0
16+
libffi-3.3-r2
17+
libintl-0.20.2-r0
18+
libproc-3.3.16-r0
19+
libssl1.1-1.1.1g-r0
20+
libtls-standalone-2.9.1-r1
21+
linux-pam-1.3.1-r4
22+
musl-1.1.24-r8
23+
musl-utils-1.1.24-r8
24+
ncurses-libs-6.2_p20200523-r0
25+
ncurses-terminfo-base-6.2_p20200523-r0
26+
procps-3.3.16-r0
27+
py3-appdirs-1.4.4-r1
28+
py3-cachecontrol-0.12.6-r0
29+
py3-certifi-2020.4.5.1-r0
30+
py3-chardet-3.0.4-r4
31+
py3-colorama-0.4.3-r0
32+
py3-contextlib2-0.6.0-r0
33+
py3-distlib-0.3.0-r0
34+
py3-distro-1.5.0-r1
35+
py3-html5lib-1.0.1-r4
36+
py3-idna-2.9-r0
37+
py3-lockfile-0.12.2-r3
38+
py3-msgpack-1.0.0-r0
39+
py3-ordered-set-4.0.1-r0
40+
py3-packaging-20.4-r0
41+
py3-parsing-2.4.7-r0
42+
py3-pep517-0.8.2-r0
43+
py3-pip-20.1.1-r0
44+
py3-progress-1.5-r0
45+
py3-pytoml-0.1.21-r0
46+
py3-requests-2.23.0-r0
47+
py3-retrying-1.3.3-r0
48+
py3-setuptools-47.0.0-r0
49+
py3-six-1.15.0-r0
50+
py3-toml-0.10.1-r0
51+
py3-urllib3-1.25.9-r0
52+
py3-webencodings-0.5.1-r3
53+
python3-3.8.3-r0
54+
readline-8.0.4-r0
55+
scanelf-1.2.6-r0
56+
shadow-4.8.1-r0
57+
sqlite-libs-3.32.1-r0
58+
ssl_client-1.31.1-r19
59+
tzdata-2020a-r0
60+
xz-5.2.5-r0
61+
xz-libs-5.2.5-r0
62+
zlib-1.2.11-r3

packages.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
docker build . -t base-python
4+
docker run --rm --entrypoint '/bin/sh' -v ${PWD}:/tmp base-python -c '\
5+
apk info -v | sort > /tmp/package_versions.txt && \
6+
chmod 777 /tmp/package_versions.txt'

0 commit comments

Comments
 (0)