Merge pull request #184 from linuxserver/master-noble

This commit is contained in:
Adam 2024-08-20 16:08:16 +01:00 committed by GitHub
commit 11dbec9f82
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 36 additions and 34 deletions

View File

@ -1,4 +1,6 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-ubuntu:noble
# set version label
ARG BUILD_DATE
@ -16,11 +18,9 @@ RUN \
apt-get update && \
apt-get install -y \
git \
jq \
libatomic1 \
nano \
net-tools \
netcat \
sudo && \
echo "**** install code-server ****" && \
if [ -z ${CODE_RELEASE+x} ]; then \
@ -33,6 +33,7 @@ RUN \
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-amd64.tar.gz" && \
tar xf /tmp/code-server.tar.gz -C \
/app/code-server --strip-components=1 && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** clean up ****" && \
apt-get clean && \
rm -rf \

View File

@ -1,4 +1,6 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-noble
# set version label
ARG BUILD_DATE
@ -16,11 +18,9 @@ RUN \
apt-get update && \
apt-get install -y \
git \
jq \
libatomic1 \
nano \
net-tools \
netcat \
sudo && \
echo "**** install code-server ****" && \
if [ -z ${CODE_RELEASE+x} ]; then \
@ -33,6 +33,7 @@ RUN \
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-arm64.tar.gz" && \
tar xf /tmp/code-server.tar.gz -C \
/app/code-server --strip-components=1 && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** clean up ****" && \
apt-get clean && \
rm -rf \

4
Jenkinsfile vendored
View File

@ -33,8 +33,8 @@ pipeline {
CI_PORT='8443'
CI_SSL='false'
CI_DELAY='120'
CI_DOCKERENV='TZ=US/Pacific'
CI_AUTH='user:password'
CI_DOCKERENV=''
CI_AUTH=''
CI_WEBPATH=''
}
stages {

View File

@ -101,7 +101,7 @@ services:
- PROXY_DOMAIN=code-server.my.domain #optional
- DEFAULT_WORKSPACE=/config/workspace #optional
volumes:
- /path/to/appdata/config:/config
- /path/to/code-server/config:/config
ports:
- 8443:8443
restart: unless-stopped
@ -122,7 +122,7 @@ docker run -d \
-e PROXY_DOMAIN=code-server.my.domain `#optional` \
-e DEFAULT_WORKSPACE=/config/workspace `#optional` \
-p 8443:8443 \
-v /path/to/appdata/config:/config \
-v /path/to/code-server/config:/config \
--restart unless-stopped \
lscr.io/linuxserver/code-server:latest
```
@ -306,6 +306,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **19.08.24:** - Rebase to Ubuntu Noble.
* **01.07.23:** - Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)
* **05.10.22:** - Install recommended deps to maintain parity with the older images.
* **29.09.22:** - Rebase to jammy, switch to s6v3. Fix chown logic to skip `/config/workspace` contents.

View File

@ -22,6 +22,6 @@ repo_vars:
- CI_PORT='8443'
- CI_SSL='false'
- CI_DELAY='120'
- CI_DOCKERENV='TZ=US/Pacific'
- CI_AUTH='user:password'
- CI_DOCKERENV=''
- CI_AUTH=''
- CI_WEBPATH=''

View File

@ -10,22 +10,16 @@ project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_
available_architectures:
- {arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
- {arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
# development version
development_versions: false
development_versions_items:
- {tag: "latest", desc: "Stable releases"}
# container parameters
common_param_env_vars_enabled: true
param_container_name: "{{ project_name }}"
param_usage_include_vols: true
param_volumes:
- {vol_path: "/config", vol_host_path: "/path/to/appdata/config", desc: "Contains all relevant configuration files."}
- {vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/config", desc: "Contains all relevant configuration files."}
param_usage_include_ports: true
param_ports:
- {external_port: "8443", internal_port: "8443", port_desc: "web gui"}
param_usage_include_env: true
param_env_vars:
- {env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London"}
# optional container parameters
opt_param_usage_include_env: true
opt_param_env_vars:
@ -35,8 +29,7 @@ opt_param_env_vars:
- {env_var: "SUDO_PASSWORD_HASH", env_value: "", desc: "Optionally set sudo password via hash (takes priority over `SUDO_PASSWORD` var). Format is `$type$salt$hashed`."}
- {env_var: "PROXY_DOMAIN", env_value: "code-server.my.domain", desc: "If this optional variable is set, this domain will be proxied for subdomain proxying. See [Documentation](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#sub-domains)"}
- {env_var: "DEFAULT_WORKSPACE", env_value: "/config/workspace", desc: "If this optional variable is set, code-server will open this directory by default"}
optional_block_1: false
optional_block_1_items: ""
# application setup block
app_setup_block_enabled: true
app_setup_block: |
@ -54,6 +47,7 @@ app_setup_block: |
How to create the [hashed password](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#can-i-store-my-password-hashed).
# changelog
changelogs:
- {date: "19.08.24:", desc: "Rebase to Ubuntu Noble."}
- {date: "01.07.23:", desc: "Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)"}
- {date: "05.10.22:", desc: "Install recommended deps to maintain parity with the older images."}
- {date: "29.09.22:", desc: "Rebase to jammy, switch to s6v3. Fix chown logic to skip `/config/workspace` contents."}

View File

@ -1,14 +1,15 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
mkdir -p /config/{extensions,data,workspace,.ssh}
if [ -n "${SUDO_PASSWORD}" ] || [ -n "${SUDO_PASSWORD_HASH}" ]; then
if [[ -n "${SUDO_PASSWORD}" ]] || [[ -n "${SUDO_PASSWORD_HASH}" ]]; then
echo "setting up sudo access"
if ! grep -q 'abc' /etc/sudoers; then
echo "adding abc to sudoers"
echo "abc ALL=(ALL:ALL) ALL" >> /etc/sudoers
fi
if [ -n "${SUDO_PASSWORD_HASH}" ]; then
if [[ -n "${SUDO_PASSWORD_HASH}" ]]; then
echo "setting sudo password using sudo password hash"
sed -i "s|^abc:\!:|abc:${SUDO_PASSWORD_HASH}:|" /etc/shadow
else
@ -17,15 +18,18 @@ if [ -n "${SUDO_PASSWORD}" ] || [ -n "${SUDO_PASSWORD_HASH}" ]; then
fi
fi
[[ ! -f /config/.bashrc ]] && \
if [[ ! -f /config/.bashrc ]]; then
cp /root/.bashrc /config/.bashrc
[[ ! -f /config/.profile ]] && \
fi
if [[ ! -f /config/.profile ]]; then
cp /root/.profile /config/.profile
fi
# fix permissions (ignore contents of /config/workspace)
find /config -path /config/workspace -prune -o -exec chown abc:abc {} +
chown abc:abc /config/workspace
chmod 700 /config/.ssh
if [ -n "$(ls -A /config/.ssh)" ]; then
if [[ -n "$(ls -A /config/.ssh)" ]]; then
chmod 600 /config/.ssh/*
fi

View File

@ -1,13 +1,14 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
if [ -n "${PASSWORD}" ] || [ -n "${HASHED_PASSWORD}" ]; then
if [[ -n "${PASSWORD}" ]] || [[ -n "${HASHED_PASSWORD}" ]]; then
AUTH="password"
else
AUTH="none"
echo "starting with no password"
fi
if [ -z ${PROXY_DOMAIN+x} ]; then
if [[ -z ${PROXY_DOMAIN+x} ]]; then
PROXY_DOMAIN_ARG=""
else
PROXY_DOMAIN_ARG="--proxy-domain=${PROXY_DOMAIN}"

View File

@ -3,7 +3,7 @@
_install=(/app/code-server/bin/code-server "--extensions-dir" "/config/extensions" "--install-extension")
if [ "$(whoami)" == "abc" ]; then
if [[ "$(whoami)" == "abc" ]]; then
"${_install[@]}" "$@"
else
s6-setuidgid abc "${_install[@]}" "$@"