Add https server

This commit is contained in:
Asher
2019-07-11 17:12:52 -05:00
parent 81862d4fa1
commit 2b2aa9a211
20 changed files with 405 additions and 186 deletions

View File

@ -3,11 +3,21 @@ set -euo pipefail
# Build using a Docker container.
function docker-build() {
local image="codercom/nbin-${target}"
if [[ "${target}" == "linux" ]] ; then
image="codercom/nbin-centos"
fi
local containerId
containerId=$(docker create --network=host --rm -it -v "$(pwd)"/.cache:/src/.cache "${image}")
docker start "${containerId}"
docker exec "${containerId}" mkdir -p /src
# TODO: temporary as long as we are rebuilding modules.
if [[ "${image}" == "codercom/nbin-alpine" ]] ; then
docker exec "${containerId}" apk add libxkbfile-dev libsecret-dev
fi
function docker-exec() {
local command="${1}" ; shift
local args="'${codeServerVersion}' '${vscodeVersion}' '${target}' '${arch}'"
@ -57,14 +67,6 @@ function main() {
target=darwin
local-build
else
local image
if [[ "${target}" == alpine ]]; then
image=codercom/nbin-alpine
target=musl
else
image=codercom/nbin-centos
target=linux
fi
docker-build
fi
}