forked from spritsail/alpine
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
37c7781c2d | |||
1ddb92853c | |||
7853193403 |
59
.drone.star
59
.drone.star
@ -1,59 +0,0 @@
|
||||
def main(ctx):
|
||||
return [
|
||||
step("3.8"),
|
||||
step("3.9"),
|
||||
step("3.10"),
|
||||
step("3.11",["latest"]),
|
||||
step("edge"),
|
||||
]
|
||||
|
||||
def step(alpinever,tags=[]):
|
||||
return {
|
||||
"kind": "pipeline",
|
||||
"name": "build-%s" % alpinever,
|
||||
"steps": [
|
||||
{
|
||||
"name": "build",
|
||||
"image": "spritsail/docker-build",
|
||||
"pull": "always",
|
||||
"settings": {
|
||||
"repo": "alpine-dev-%s" % alpinever,
|
||||
"build_args": [
|
||||
"ALPINE_TAG=%s" % alpinever,
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
"name": "test",
|
||||
"image": "spritsail/docker-test",
|
||||
"pull": "always",
|
||||
"settings": {
|
||||
"repo": "spritsail/alpine",
|
||||
"run": "su-exec nobody apk --version",
|
||||
},
|
||||
},
|
||||
{
|
||||
"name": "publish",
|
||||
"image": "spritsail/docker-publish",
|
||||
"pull": "always",
|
||||
"settings": {
|
||||
"from": "alpine-dev-%s" % alpinever,
|
||||
"repo": "spritsail/alpine",
|
||||
"tags": [alpinever] + tags,
|
||||
},
|
||||
"environment": {
|
||||
"DOCKER_USERNAME": {
|
||||
"from_secret": "docker_username",
|
||||
},
|
||||
"DOCKER_PASSWORD": {
|
||||
"from_secret": "docker_password",
|
||||
},
|
||||
},
|
||||
"when": {
|
||||
"branch": ["master"],
|
||||
"event": ["push"],
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
|
26
.drone.yml
Normal file
26
.drone.yml
Normal file
@ -0,0 +1,26 @@
|
||||
pipeline:
|
||||
build:
|
||||
image: spritsail/docker-build
|
||||
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
|
||||
repo: alpine-dev
|
||||
build_args:
|
||||
- ALPINE_TAG=3.8
|
||||
|
||||
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: [ 3.8 ], 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:3.8'
|
||||
|
||||
notify:
|
||||
image: spritsail/notify
|
||||
when: { status: [ success, failure ] }
|
||||
secrets: [ webhook_url, notify_token ]
|
31
Dockerfile
31
Dockerfile
@ -1,7 +1,19 @@
|
||||
ARG ALPINE_TAG=3.11
|
||||
ARG SU_EXEC_VER=v0.3
|
||||
ARG ALPINE_TAG=3.8
|
||||
|
||||
FROM alpine:$ALPINE_TAG
|
||||
FROM alpine:3.7 AS upgrade
|
||||
|
||||
ARG ALPINE_TAG
|
||||
RUN sed -i "s/3\.7/${ALPINE_TAG}/g" /etc/apk/repositories \
|
||||
&& apk --no-cache upgrade
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=upgrade / /
|
||||
|
||||
ARG SU_EXEC_VER
|
||||
ARG ALPINE_TAG
|
||||
|
||||
LABEL maintainer="Spritsail <alpine@spritsail.io>" \
|
||||
@ -9,18 +21,19 @@ 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}
|
||||
org.label-schema.version=${ALPINE_TAG} \
|
||||
io.spritsail.version.su-exec=${SU_EXEC_VER}
|
||||
|
||||
# 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 sed -i '1ihttp://alpine.spritsail.io/spritsail' /etc/apk/repositories \
|
||||
&& apk --no-cache add \
|
||||
su-exec \
|
||||
tini
|
||||
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
|
||||
|
||||
ENTRYPOINT ["/sbin/tini" , "--"]
|
||||
|
@ -1,6 +1,6 @@
|
||||
export PAGER='/usr/bin/less'
|
||||
export PAGER='/usr/bin/less -R'
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user