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

Commit 0cf7971

Browse files
committed
alpine base image version of cloud9
1 parent 58fbe99 commit 0cf7971

File tree

8 files changed

+76
-76
lines changed

8 files changed

+76
-76
lines changed

Dockerfile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
FROM lsiobase/cloud9:files as builder
2-
FROM lsiobase/ubuntu:bionic
1+
FROM lsiobase/cloud9:files-alpine as builder
2+
FROM lsiobase/alpine:3.9
33

44
# set version label
55
ARG BUILD_DATE
@@ -12,20 +12,20 @@ COPY --from=builder /buildout/ /
1212

1313
RUN \
1414
echo "**** install base packages ****" && \
15-
apt-get update && \
16-
apt-get install -y --no-install-recommends \
15+
apk add --no-cache \
16+
c-ares \
1717
curl \
1818
git \
1919
gnupg \
20+
http-parser \
21+
libevent \
22+
libevent \
23+
libstdc++ \
24+
libuv \
2025
sudo && \
21-
echo "**** Cleanup and user perms ****" && \
22-
usermod -aG sudo \
23-
abc && \
24-
apt-get autoclean && \
25-
rm -rf \
26-
/var/lib/apt/lists/* \
27-
/var/tmp/* \
28-
/tmp/*
26+
echo "**** user perms ****" && \
27+
usermod -aG wheel \
28+
abc
2929

3030
# add local files
3131
COPY root/ /

Dockerfile.aarch64

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
FROM lsiobase/cloud9:arm64v8-files as builder
2-
FROM lsiobase/ubuntu:arm64v8-bionic
1+
FROM lsiobase/cloud9:arm64v8-files-alpine as builder
2+
FROM lsiobase/alpine:arm64v8-3.9
33

44
# set version label
55
ARG BUILD_DATE
@@ -12,20 +12,20 @@ COPY --from=builder /buildout/ /
1212

1313
RUN \
1414
echo "**** install base packages ****" && \
15-
apt-get update && \
16-
apt-get install -y --no-install-recommends \
15+
apk add --no-cache \
16+
c-ares \
1717
curl \
1818
git \
1919
gnupg \
20+
http-parser \
21+
libevent \
22+
libevent \
23+
libstdc++ \
24+
libuv \
2025
sudo && \
21-
echo "**** Cleanup and user perms ****" && \
22-
usermod -aG sudo \
23-
abc && \
24-
apt-get autoclean && \
25-
rm -rf \
26-
/var/lib/apt/lists/* \
27-
/var/tmp/* \
28-
/tmp/*
26+
echo "**** user perms ****" && \
27+
usermod -aG wheel \
28+
abc
2929

3030
# add local files
3131
COPY root/ /

Dockerfile.armhf

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
FROM lsiobase/cloud9:arm32v7-files as builder
2-
FROM lsiobase/ubuntu:arm32v7-bionic
1+
FROM lsiobase/cloud9:arm32v7-files-alpine as builder
2+
FROM lsiobase/alpine:arm32v7-3.9
33

44
# set version label
55
ARG BUILD_DATE
@@ -12,20 +12,20 @@ COPY --from=builder /buildout/ /
1212

1313
RUN \
1414
echo "**** install base packages ****" && \
15-
apt-get update && \
16-
apt-get install -y --no-install-recommends \
15+
apk add --no-cache \
16+
c-ares \
1717
curl \
1818
git \
1919
gnupg \
20+
http-parser \
21+
libevent \
22+
libevent \
23+
libstdc++ \
24+
libuv \
2025
sudo && \
21-
echo "**** Cleanup and user perms ****" && \
22-
usermod -aG sudo \
23-
abc && \
24-
apt-get autoclean && \
25-
rm -rf \
26-
/var/lib/apt/lists/* \
27-
/var/tmp/* \
28-
/tmp/*
26+
echo "**** user perms ****" && \
27+
usermod -aG wheel \
28+
abc
2929

3030
# add local files
3131
COPY root/ /

Jenkinsfile

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pipeline {
1717
DOCKERHUB_IMAGE = 'lsiobase/cloud9'
1818
DEV_DOCKERHUB_IMAGE = 'lsiodev/cloud9-base'
1919
PR_DOCKERHUB_IMAGE = 'lspipepr/cloud9-base'
20-
DIST_IMAGE = 'ubuntu'
20+
DIST_IMAGE = 'alpine'
2121
MULTIARCH='true'
2222
CI='true'
2323
CI_WEB='true'
@@ -35,7 +35,7 @@ pipeline {
3535
script{
3636
env.EXIT_STATUS = ''
3737
env.LS_RELEASE = sh(
38-
script: '''docker run --rm alexeiled/skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':latest 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
38+
script: '''docker run --rm alexeiled/skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':alpine 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
3939
returnStdout: true).trim()
4040
env.LS_RELEASE_NOTES = sh(
4141
script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
@@ -118,10 +118,10 @@ pipeline {
118118
}
119119
}
120120
}
121-
// If this is a master build use live docker endpoints
121+
// If this is a alpine build use live docker endpoints
122122
stage("Set ENV live build"){
123123
when {
124-
branch "master"
124+
branch "alpine"
125125
environment name: 'CHANGE_ID', value: ''
126126
}
127127
steps {
@@ -139,7 +139,7 @@ pipeline {
139139
// If this is a dev build use dev docker endpoints
140140
stage("Set ENV dev build"){
141141
when {
142-
not {branch "master"}
142+
not {branch "alpine"}
143143
environment name: 'CHANGE_ID', value: ''
144144
}
145145
steps {
@@ -206,7 +206,7 @@ pipeline {
206206
// Use helper containers to render templated files
207207
stage('Update-Templates') {
208208
when {
209-
branch "master"
209+
branch "alpine"
210210
environment name: 'CHANGE_ID', value: ''
211211
expression {
212212
env.CONTAINER_NAME != null
@@ -217,15 +217,15 @@ pipeline {
217217
set -e
218218
TEMPDIR=$(mktemp -d)
219219
docker pull linuxserver/jenkins-builder:latest
220-
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins linuxserver/jenkins-builder:latest
220+
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=alpine -v ${TEMPDIR}:/ansible/jenkins linuxserver/jenkins-builder:latest
221221
docker pull linuxserver/doc-builder:latest
222-
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/readme linuxserver/doc-builder:latest
222+
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=alpine -v ${TEMPDIR}:/ansible/readme linuxserver/doc-builder:latest
223223
if [ "$(md5sum ${TEMPDIR}/${LS_REPO}/Jenkinsfile | awk '{ print $1 }')" != "$(md5sum Jenkinsfile | awk '{ print $1 }')" ] || \
224224
[ "$(md5sum ${TEMPDIR}/${CONTAINER_NAME}/README.md | awk '{ print $1 }')" != "$(md5sum README.md | awk '{ print $1 }')" ] || \
225225
[ "$(cat ${TEMPDIR}/${LS_REPO}/LICENSE | md5sum | cut -c1-8)" != "${LICENSE_TAG}" ]; then
226226
mkdir -p ${TEMPDIR}/repo
227227
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
228-
git --git-dir ${TEMPDIR}/repo/${LS_REPO}/.git checkout -f master
228+
git --git-dir ${TEMPDIR}/repo/${LS_REPO}/.git checkout -f alpine
229229
cp ${TEMPDIR}/${CONTAINER_NAME}/README.md ${TEMPDIR}/repo/${LS_REPO}/
230230
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
231231
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/LICENSE ${TEMPDIR}/repo/${LS_REPO}/
@@ -257,7 +257,7 @@ pipeline {
257257
// Exit the build if the Templated files were just updated
258258
stage('Template-exit') {
259259
when {
260-
branch "master"
260+
branch "alpine"
261261
environment name: 'CHANGE_ID', value: ''
262262
environment name: 'FILES_UPDATED', value: 'true'
263263
expression {
@@ -356,7 +356,7 @@ pipeline {
356356
// Take the image we just built and dump package versions for comparison
357357
stage('Update-packages') {
358358
when {
359-
branch "master"
359+
branch "alpine"
360360
environment name: 'CHANGE_ID', value: ''
361361
environment name: 'EXIT_STATUS', value: ''
362362
}
@@ -384,7 +384,7 @@ pipeline {
384384
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
385385
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
386386
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO}
387-
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f master
387+
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f alpine
388388
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
389389
cd ${TEMPDIR}/${LS_REPO}/
390390
wait
@@ -408,7 +408,7 @@ pipeline {
408408
// Exit the build if the package file was just updated
409409
stage('PACKAGE-exit') {
410410
when {
411-
branch "master"
411+
branch "alpine"
412412
environment name: 'CHANGE_ID', value: ''
413413
environment name: 'PACKAGE_UPDATED', value: 'true'
414414
environment name: 'EXIT_STATUS', value: ''
@@ -422,7 +422,7 @@ pipeline {
422422
// Exit the build if this is just a package check and there are no changes to push
423423
stage('PACKAGECHECK-exit') {
424424
when {
425-
branch "master"
425+
branch "alpine"
426426
environment name: 'CHANGE_ID', value: ''
427427
environment name: 'PACKAGE_UPDATED', value: 'false'
428428
environment name: 'EXIT_STATUS', value: ''
@@ -507,12 +507,12 @@ pipeline {
507507
sh '''#! /bin/bash
508508
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
509509
'''
510-
sh "docker tag ${IMAGE}:${META_TAG} ${IMAGE}:latest"
511-
sh "docker push ${IMAGE}:latest"
510+
sh "docker tag ${IMAGE}:${META_TAG} ${IMAGE}:alpine"
511+
sh "docker push ${IMAGE}:alpine"
512512
sh "docker push ${IMAGE}:${META_TAG}"
513513
sh '''docker rmi \
514514
${IMAGE}:${META_TAG} \
515-
${IMAGE}:latest || :'''
515+
${IMAGE}:alpine || :'''
516516

517517
}
518518
}
@@ -542,32 +542,32 @@ pipeline {
542542
docker tag lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG}
543543
docker tag lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
544544
fi'''
545-
sh "docker tag ${IMAGE}:amd64-${META_TAG} ${IMAGE}:amd64-latest"
546-
sh "docker tag ${IMAGE}:arm32v7-${META_TAG} ${IMAGE}:arm32v7-latest"
547-
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ${IMAGE}:arm64v8-latest"
545+
sh "docker tag ${IMAGE}:amd64-${META_TAG} ${IMAGE}:amd64-alpine"
546+
sh "docker tag ${IMAGE}:arm32v7-${META_TAG} ${IMAGE}:arm32v7-alpine"
547+
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ${IMAGE}:arm64v8-alpine"
548548
sh "docker push ${IMAGE}:amd64-${META_TAG}"
549549
sh "docker push ${IMAGE}:arm32v7-${META_TAG}"
550550
sh "docker push ${IMAGE}:arm64v8-${META_TAG}"
551-
sh "docker push ${IMAGE}:amd64-latest"
552-
sh "docker push ${IMAGE}:arm32v7-latest"
553-
sh "docker push ${IMAGE}:arm64v8-latest"
554-
sh "docker manifest push --purge ${IMAGE}:latest || :"
555-
sh "docker manifest create ${IMAGE}:latest ${IMAGE}:amd64-latest ${IMAGE}:arm32v7-latest ${IMAGE}:arm64v8-latest"
556-
sh "docker manifest annotate ${IMAGE}:latest ${IMAGE}:arm32v7-latest --os linux --arch arm"
557-
sh "docker manifest annotate ${IMAGE}:latest ${IMAGE}:arm64v8-latest --os linux --arch arm64 --variant v8"
551+
sh "docker push ${IMAGE}:amd64-alpine"
552+
sh "docker push ${IMAGE}:arm32v7-alpine"
553+
sh "docker push ${IMAGE}:arm64v8-alpine"
554+
sh "docker manifest push --purge ${IMAGE}:alpine || :"
555+
sh "docker manifest create ${IMAGE}:alpine ${IMAGE}:amd64-alpine ${IMAGE}:arm32v7-alpine ${IMAGE}:arm64v8-alpine"
556+
sh "docker manifest annotate ${IMAGE}:alpine ${IMAGE}:arm32v7-alpine --os linux --arch arm"
557+
sh "docker manifest annotate ${IMAGE}:alpine ${IMAGE}:arm64v8-alpine --os linux --arch arm64 --variant v8"
558558
sh "docker manifest push --purge ${IMAGE}:${META_TAG} || :"
559559
sh "docker manifest create ${IMAGE}:${META_TAG} ${IMAGE}:amd64-${META_TAG} ${IMAGE}:arm32v7-${META_TAG} ${IMAGE}:arm64v8-${META_TAG}"
560560
sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm32v7-${META_TAG} --os linux --arch arm"
561561
sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8"
562-
sh "docker manifest push --purge ${IMAGE}:latest"
562+
sh "docker manifest push --purge ${IMAGE}:alpine"
563563
sh "docker manifest push --purge ${IMAGE}:${META_TAG}"
564564
}
565565
}
566566
}
567567
// If this is a public release tag it in the LS Github
568568
stage('Github-Tag-Push-Release') {
569569
when {
570-
branch "master"
570+
branch "alpine"
571571
expression {
572572
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
573573
}
@@ -579,17 +579,17 @@ pipeline {
579579
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
580580
-d '{"tag":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
581581
"object": "'${COMMIT_SHA}'",\
582-
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
582+
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to alpine",\
583583
"type": "commit",\
584584
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
585585
echo "Pushing New release for Tag"
586586
sh '''#! /bin/bash
587587
echo "Updating base packages to ${PACKAGE_TAG}" > releasebody.json
588588
echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
589-
"target_commitish": "master",\
589+
"target_commitish": "alpine",\
590590
"name": "'${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}'",\
591591
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**OS Changes:**\\n\\n' > start
592-
printf '","draft": false,"prerelease": false}' >> releasebody.json
592+
printf '","draft": false,"prerelease": true}' >> releasebody.json
593593
paste -d'\\0' start releasebody.json > releasebody.json.done
594594
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
595595
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
[![](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/Dockerfile-Link-green.png)](https://github.com/linuxserver/docker-baseimage-cloud9/blob/master/Dockerfile)
2121

22-
A custom base image built with [Ubuntu linux](https://www.ubuntu.com/) and [Cloud9](https://github.com/c9/core)..
22+
A custom base image built with [Alpine linux](https://alpinelinux.org/) and [Cloud9](https://github.com/c9/core)..
2323

2424
The following line is only in this repo for loop testing:
2525

jenkins-vars.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# jenkins variables
44
project_name: docker-baseimage-cloud9
55
external_type: os
6-
release_type: stable
7-
release_tag: latest
8-
ls_branch: master
6+
release_type: prerelease
7+
release_tag: alpine
8+
ls_branch: alpine
99
repo_vars:
1010
- BUILD_VERSION_ARG = 'CLOUD9_VERSION'
1111
- LS_USER = 'linuxserver'
@@ -14,7 +14,7 @@ repo_vars:
1414
- DOCKERHUB_IMAGE = 'lsiobase/cloud9'
1515
- DEV_DOCKERHUB_IMAGE = 'lsiodev/cloud9-base'
1616
- PR_DOCKERHUB_IMAGE = 'lspipepr/cloud9-base'
17-
- DIST_IMAGE = 'ubuntu'
17+
- DIST_IMAGE = 'alpine'
1818
- MULTIARCH='true'
1919
- CI='true'
2020
- CI_WEB='true'

readme-vars.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ full_custom_readme: |
2525
2626
[![](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/Dockerfile-Link-green.png)](https://github.com/linuxserver/docker-baseimage-cloud9/blob/master/Dockerfile)
2727
28-
A custom base image built with [Ubuntu linux](https://www.ubuntu.com/) and [Cloud9](https://github.com/c9/core)..
28+
A custom base image built with [Alpine linux](https://alpinelinux.org/) and [Cloud9](https://github.com/c9/core)..
2929
3030
The following line is only in this repo for loop testing:
3131

root/etc/cont-init.d/30-config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# check for lock file to only run git operations once
44
if [ ! -e /lock.file ]; then
55
# give abc a sudo shell for development
6+
echo "auth sufficient pam_shells.so" > /etc/pam.d/chsh
67
chsh abc -s /bin/bash
7-
sed -e 's/%sudo ALL=(ALL:ALL) ALL/%sudo ALL=(ALL:ALL) NOPASSWD: ALL/g' \
8+
sed -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' \
89
-i /etc/sudoers
9-
sed -e 's/^wheel:\(.*\)/wheel:\1,abc/g' -i /etc/group
1010
# create directory for project
1111
mkdir -p /code
1212
# make sure URL is set and folder is empty to clone code

0 commit comments

Comments
 (0)