2
0
mirror of https://github.com/spritsail/alpine.git synced 2025-06-13 14:41:13 +00:00

22 Commits

Author SHA1 Message Date
80cdda202e Build amd64/arm64 multiarch images
Signed-off-by: Adam Dodman <adam@adam-ant.co.uk>
Signed-off-by: Joe Groocock <me@frebib.net>
2022-06-17 12:29:39 +00:00
fa09f2867c Update to alpine:3.16
Signed-off-by: Joe Groocock <me@frebib.net>
2022-06-13 14:42:17 +00:00
438819be65 Update to alpine:3.15
Signed-off-by: Joe Groocock <me@frebib.net>
2021-11-24 22:40:53 +00:00
f848ecae6f Update to alpine:3.14
Signed-off-by: Joe Groocock <me@frebib.net>
2021-06-18 08:25:52 +00:00
d7d15ca14d Use https for spritsail alpine repo
http->https redirection seems to be broken in alpine 3.13, and the
repository automatically redirects to https anyway, so being explicit is
probably better, and saves a round-trip and redirect.

Signed-off-by: Joe Groocock <me@frebib.net>
2021-01-23 22:41:24 +00:00
a216ae99b9 Update to alpine:3.13
Signed-off-by: Joe Groocock <me@frebib.net>
2021-01-20 18:10:23 +00:00
7d52c725e4 Update to alpine:3.12
Signed-off-by: Joe Groocock <me@frebib.net>
2020-06-13 16:36:20 +01:00
c936978f39 Update to alpine:3.10
Some checks failed
continuous-integration/drone/push Build is failing
2020-01-08 19:37:08 +00:00
42dc788197 Replace .drone.yml with Starlark 2020-01-08 19:35:27 +00:00
9657e8c188 Update to Drone 1.x compatible matrix config 2019-11-17 15:07:51 +00:00
f68f76225f Update to alpine:3.10 2019-06-20 20:43:05 +01:00
27b5a39581 Update to alpine:3.9 2019-01-31 08:58:11 +00:00
a7026a6640 Use spritsail/drone-test CI step
[CI SKIP]
2018-09-23 00:55:16 +01:00
9986cc95e2 Remove MICROBADGER_TOKEN 2018-09-23 00:54:15 +01:00
71b9b0a028 Fix PS1 with busybox sed 2018-08-31 15:30:09 +01:00
c6ca28ed56 Fetch public key with ADD, fixes 3.6 build 2018-08-31 01:19:18 +01:00
9dfac476e2 Install su-exec from spritsail repo
Fix not removing libressl from 6abb9f9d03
This reduces the image size by ~0.5MiB
2018-08-31 01:13:14 +01:00
e3badc0a5b Fix PAGER environment var 2018-08-31 01:12:43 +01:00
967f4786e3 Remove v from tags 2018-07-09 15:42:35 +01:00
6abb9f9d03 Use libressl over openssl. Fixes 3.6 build 2018-07-08 15:28:52 +01:00
f354e4bf4f Filter dowstream notification by alpine tag. Fixes downstream cascade 2018-07-07 17:50:33 +01:00
459fff76af Update to alpine:3.8 2018-07-06 15:48:34 +01:00
4 changed files with 116 additions and 48 deletions

106
.drone.star Normal file
View File

@ -0,0 +1,106 @@
repo = "spritsail/alpine"
archs = ["amd64", "arm64"]
versions = ["edge", "3.14", "3.15", "3.16"]
branches = ["master"]
def main(ctx):
builds = []
for ver in versions:
depends_on = []
srctpl = "drone/%s/${DRONE_BUILD_NUMBER}:%s-ARCH" % (ctx.repo.slug, ver)
for arch in archs:
key = "build-%s-%s" % (ver, arch)
tmprepo = "drone/%s/${DRONE_BUILD_NUMBER}:%s-%s" % (ctx.repo.slug, ver, arch)
builds.append(step(ver, arch, key, tmprepo))
depends_on.append(key)
if ctx.build.branch in branches:
tags = []
if ver == versions[-1]:
tags.append("latest")
builds.append(publish(ver, srctpl, depends_on, tags))
return builds
def step(ver, arch, key, tmprepo):
vertest = "grep -q '%s' /etc/alpine-release && " % ver if ver != "edge" else ""
return {
"kind": "pipeline",
"name": key,
"platform": {
"os": "linux",
"arch": arch,
},
"steps": [
{
"name": "build",
"image": "spritsail/docker-build",
"pull": "always",
"settings": {
"build_args": [
"ALPINE_TAG=%s" % ver,
],
"repo": tmprepo,
},
},
{
"name": "test",
"image": "spritsail/docker-test",
"pull": "always",
"settings": {
"run": vertest + "su-exec nobody apk --version",
"repo": tmprepo,
},
},
{
"name": "publish",
"image": "spritsail/docker-publish",
"pull": "always",
"settings": {
"from": tmprepo,
"repo": tmprepo,
"registry": {"from_secret": "registry_url"},
"username": {"from_secret": "registry_username"},
"password": {"from_secret": "registry_password"},
},
"when": {
"branch": branches,
"event": ["push"],
},
},
]
}
def publish(ver, srctpl, depends, tags=[]):
return {
"kind": "pipeline",
"name": "publish-%s" % ver,
"depends_on": depends,
"platform": {
"os": "linux",
},
"steps": [
{
"name": "publish",
"image": "spritsail/docker-multiarch-publish",
"pull": "always",
"settings": {
"src_template": srctpl,
"src_registry": {"from_secret": "registry_url"},
"src_username": {"from_secret": "registry_username"},
"src_password": {"from_secret": "registry_password"},
"dest_repo": repo,
"dest_username": {"from_secret": "docker_username"},
"dest_password": {"from_secret": "docker_password"},
"tags": [ver] + tags,
},
"when": {
"branch": branches,
"event": ["push"],
},
},
]
}
# vim: ft=python sw=2

View File

@ -1,35 +0,0 @@
pipeline:
build:
image: spritsail/docker-build
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
repo: alpine-dev
build_args:
- ALPINE_TAG=${ALPINE_TAG%%,*}
test:
image: docker
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
commands:
- docker run --rm alpine-dev /bin/sh -xec 'apk --version'
publish:
image: spritsail/docker-publish
when: { branch: [ master ], event: [ push, tag, deployment ] }
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
secrets: [ docker_username, docker_password, microbadger_token ]
from: alpine-dev
repo: 'spritsail/alpine'
tags: ${ALPINE_TAG}
notify:
image: spritsail/notify
when: { status: [ success, failure ] }
secrets: [ webhook_url, notify_token ]
matrix:
ALPINE_TAG:
- 3.4
- 3.5
- 3.6
- 3.7,latest
- edge

View File

@ -1,9 +1,7 @@
ARG SU_EXEC_VER=v0.3
ARG ALPINE_TAG=3.7
ARG ALPINE_TAG=3.16
FROM alpine:$ALPINE_TAG
ARG SU_EXEC_VER
ARG ALPINE_TAG
LABEL maintainer="Spritsail <alpine@spritsail.io>" \
@ -11,19 +9,18 @@ LABEL maintainer="Spritsail <alpine@spritsail.io>" \
org.label-schema.name="Alpine Linux" \
org.label-schema.url="https://github.com/gliderlabs/docker-alpine" \
org.label-schema.description="Alpine Linux base image" \
org.label-schema.version=${ALPINE_TAG} \
io.spritsail.version.su-exec=${SU_EXEC_VER}
org.label-schema.version=${ALPINE_TAG}
# Override shell for sh-y debugging goodness
SHELL ["/bin/sh", "-exc"]
COPY skel/ /
ADD https://alpine.spritsail.io/spritsail-alpine.rsa.pub /etc/apk/keys
ENV ENV="/etc/profile"
RUN apk --no-cache add \
tini \
openssl \
&& wget -qO /sbin/su-exec https://github.com/frebib/su-exec/releases/download/${SU_EXEC_VER}/su-exec-alpine-$(uname -m) \
&& chmod +x /sbin/su-exec \
&& apk --no-cache del openssl
RUN sed -i '1ihttps://alpine.spritsail.io/spritsail' /etc/apk/repositories \
&& apk --no-cache add \
su-exec \
tini
ENTRYPOINT ["/sbin/tini" , "--"]

View File

@ -1,6 +1,6 @@
export PAGER='/usr/bin/less -R'
export PAGER='/usr/bin/less'
export EDITOR='/usr/bin/vi'
export PS1='\e[1;36m\u@\h\e[0m \e[0;32m$(pwd | sed -E '"'s|^'\$HOME'|~|;s|(.*)/|\\1%#|;s|((^\\|/)\\.?[^/%]{1})[^/%]*|\\1|g;s|(.*)%#|\\1/|')"'\e[0m> '
export PS1='\e[1;36m\u@\h\e[0m \e[0;32m$(pwd | sed -E '"'s@^'\$HOME'@~@;s@(.*)/@\\1%#@;s@((^|/)\\.?[^/%]{1})[^/%]*@\\1@g;s@(.*)%#@\\1/@')"'\e[0m> '
# Source configuration files from /etc/profile.d
for i in /etc/profile.d/*.sh ; do