aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile.devcontainer
blob: 703d8009aba639a82d6ee9604fd88bce01b33869 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
ARG DEBIAN_FRONTEND=noninteractive
ARG GITHUB_WORKSPACE=/build
ARG BUILDARCH=amd64
ARG ARCH=x86_64
ARG ZIG_PATH=${GITHUB_WORKSPACE}/zig
ARG WEBKIT_DIR=${GITHUB_WORKSPACE}/bun-webkit 
ARG BUN_RELEASE_DIR=${GITHUB_WORKSPACE}/bun-release
ARG BUN_DEPS_OUT_DIR=${GITHUB_WORKSPACE}/bun-deps
ARG BUN_DIR=${GITHUB_WORKSPACE}/bun
ARG BUN_PACKAGES_DIR=${BUN_DIR}/packages
ARG ZIG_VERSION="0.11.0-dev.947+cf822c6dd"

ARG ZIG_FOLDERNAME=zig-linux-${ARCH}-${ZIG_VERSION}
ARG ZIG_FILENAME=${ZIG_FOLDERNAME}.tar.xz
ARG ZIG_URL="https://ziglang.org/builds/${ZIG_FILENAME}"

FROM --platform=linux/${BUILDARCH} ubuntu:22.04 as bun.devcontainer

ARG DEBIAN_FRONTEND
ARG GITHUB_WORKSPACE
ARG BUILDARCH
ARG ZIG_PATH
ARG WEBKIT_DIR
ARG BUN_RELEASE_DIR
ARG BUN_DEPS_OUT_DIR
ARG BUN_DIR
ARG BUN_PACKAGES_DIR

ENV WEBKIT_OUT_DIR ${WEBKIT_DIR}
ENV PATH "$ZIG_PATH:$PATH"
ENV JSC_BASE_DIR $WEBKIT_OUT_DIR
ENV LIB_ICU_PATH ${WEBKIT_OUT_DIR}/lib
ENV BUN_RELEASE_DIR ${BUN_RELEASE_DIR}
ENV PATH "${BUN_PACKAGES_DIR}/bun-linux-x64:${BUN_PACKAGES_DIR}/bun-linux-aarch64:${BUN_PACKAGES_DIR}/debug-bun-linux-x64:${BUN_PACKAGES_DIR}/debug-bun-linux-aarch64:$PATH"
ENV PATH "/home/ubuntu/zls/zig-out/bin:$PATH"
ENV BUN_INSTALL /home/ubuntu/.bun
ENV XDG_CONFIG_HOME /home/ubuntu/.config

WORKDIR ${GITHUB_WORKSPACE}

RUN apt-get update && \
    apt-get install --no-install-recommends -y wget gnupg2 curl lsb-release wget software-properties-common && \
    add-apt-repository ppa:longsleep/golang-backports && \
    wget https://apt.llvm.org/llvm.sh --no-check-certificate && \
    chmod +x llvm.sh && \
    ./llvm.sh 15 && \
    curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
    apt-get update && \
    apt-get install --no-install-recommends -y \
    ca-certificates \
    curl \
    gnupg2 \
    software-properties-common \
    cmake \
    build-essential \
    git \
    libssl-dev \
    ruby \
    liblld-15-dev \
    libclang-15-dev \
    nodejs \
    gcc \
    g++ \
    clang-15 \
    clang-format-15 \
    libc++-15-dev \
    libc++abi-15-dev \
    lld-15 \
    libicu-dev \
    wget \
    rustc \
    cargo \
    unzip \
    tar \
    golang-go ninja-build pkg-config automake autoconf libtool curl && \
    update-alternatives --install /usr/bin/cc cc /usr/bin/clang-15 90 && \
    update-alternatives --install /usr/bin/cpp cpp /usr/bin/clang++-15 90 && \
    update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-15 90 && \
    npm install -g esbuild

ENV CC=clang-15 
ENV CXX=clang++-15
ENV ZIG "${ZIG_PATH}/zig"

WORKDIR $GITHUB_WORKSPACE

RUN cd / && mkdir -p $BUN_RELEASE_DIR $BUN_DEPS_OUT_DIR ${BUN_DIR} ${BUN_DEPS_OUT_DIR}

WORKDIR $GITHUB_WORKSPACE


ARG ZIG_FOLDERNAME
ARG ZIG_FILENAME
ARG ZIG_URL

ADD $ZIG_URL .
RUN tar -xf ${ZIG_FILENAME} && \
    rm ${ZIG_FILENAME} && \
    mv ${ZIG_FOLDERNAME} ${ZIG_PATH};

RUN cd $GITHUB_WORKSPACE && \
    curl -o bun-webkit-linux-$BUILDARCH.tar.gz -L https://github.com/oven-sh/WebKit/releases/download/dec30/bun-webkit-linux-$BUILDARCH.tar.gz && \
    tar -xzf bun-webkit-linux-$BUILDARCH.tar.gz && \
    rm bun-webkit-linux-$BUILDARCH.tar.gz && \
    cat $WEBKIT_OUT_DIR/include/cmakeconfig.h > /dev/null

RUN apt-get -y update && update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-15 90

COPY .devcontainer/workspace.code-workspace $GITHUB_WORKSPACE/workspace.code-workspace
COPY .devcontainer/zls.json $GITHUB_WORKSPACE/workspace.code-workspace
COPY .devcontainer/limits.conf /etc/security/limits.conf
COPY ".devcontainer/scripts/" /scripts/
COPY ".devcontainer/scripts/getting-started.sh" $GITHUB_WORKSPACE/getting-started.sh
COPY ".devcontainer/README.md" $GITHUB_WORKSPACE/README.md

ENV JSC_BASE_DIR=$WEBKIT_DIR
ENV WEBKIT_RELEASE_DIR=$WEBKIT_DIR
ENV WEBKIT_DEBUG_DIR=$WEBKIT_DIR
ENV WEBKIT_RELEASE_DIR_LTO=$WEBKIT_DIR

RUN mkdir -p /home/ubuntu/.bun /home/ubuntu/.config $GITHUB_WORKSPACE/bun && \
    bash /scripts/common-debian.sh && \
    bash /scripts/github.sh && \
    bash /scripts/nice.sh && \
    bash /scripts/zig-env.sh
COPY .devcontainer/zls.json /home/ubuntu/.config/zls.json
>fix(vercel): added type definitions (#3355)Gravatar Juan Martín Seery 2-1/+18 * Added missing types * Changeset 2022-05-12[ci] release (#3334)create-astro@0.12.1astro@1.0.0-beta.28@astrojs/vue@0.1.4@astrojs/vercel@0.2.0@astrojs/svelte@0.1.3@astrojs/react@0.1.2@astrojs/netlify@0.3.4Gravatar github-actions[bot] 58-196/+171 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> 2022-05-12Serialize route generation (#3354)Gravatar Juan Martín Seery 5-59/+61 2022-05-12Corrected the default value of trailingSlash (#3353)Gravatar Rafid Muhymin Wafi 1-1/+1 2022-05-12[ci] formatGravatar matthewp 1-85/+78 2022-05-12Fixed search bar of the docs example not working (#3247)Gravatar Rafid Muhymin Wafi 1-76/+94 * fixed search bar not working * fixed search bar not working during build * fix search bar throwing error on production site 2022-05-12Add config option customPages (#3315)Gravatar Eloi-Perez 1-0/+14 * Add config option customPages Add config option customPages to be able to add custom URL pages to the sitemap.xml * add comment to document customPages option 2022-05-12fix: vite types (#3352)Gravatar Juan Martín Seery 4-5/+16 * Re-export vite types and added them to zod schema * Removed casted typed * Changeset 2022-05-12[ci] update lockfile (#3287)Gravatar Fred K. Schott 33-1038/+1096 * [ci] update lockfile * chore: fix lockfile * fix: pin turbo Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com> Co-authored-by: Nate Moore <nate@skypack.dev> 2022-05-12[ci] formatGravatar matthewp 2-2/+2 2022-05-12add error hints (#3350)Gravatar Fred K. Schott 3-0/+19 * add error hints * chore: add changeset Co-authored-by: Nate Moore <nate@skypack.dev> 2022-05-12[ci] formatGravatar matthewp 2-10/+6 2022-05-12Fix: React - Use "createRoot" instead of "hydrateRoot" for `client:only` (#3337)Gravatar Ben Holmes 4-22/+34 * feat: pass "client" directive to clientEntrypoints * refactor: remove hydration warning suppression react 17 * feat: remove hydration warning suppression react 18 * chore: changeset * fix: change metadata to options bag 2022-05-12[ci] formatGravatar matthewp 1-2/+8 2022-05-12Resolve components by module ID during compilation (#3300)Gravatar Tony Sullivan 22-41/+407 * WIP: adding test coverage * test fixes * moving the shared lib up a directory to reproduce the bug * fix: transform with the module ID instead of parsing the filepath * adding the shared lib to the workspaces list * fix: client-only assets now get the full URL from vite * why is this needed for windows? * WIP: using /@fs to handle windows filepaths * fix: remove /@fs from hoisted script imports * nit: removing unused imports * fix: strip off the path root when mapping client:only styles * had to reverse the `/@fs` handling to work on windows and unix * chore: adding comments to explain the fix * chore: adding changeset 2022-05-12[ci] collect statsGravatar FredKSchott 1-0/+1 2022-05-11Exclude `node-fetch` from vite.optimizeDeps (#3348)Gravatar Nate Moore 2-0/+6 * fix: exclude `node-fetch` from vite.optimizeDeps * chore: format 2022-05-11fix: updated blog template with existing address (#3312)Gravatar Gautier Ben Aïm 1-2/+2 2022-05-11refactor(vercel): Build Output API v3 (#3216)Gravatar Juan Martín Seery 42-231/+659 * Removed ignores * Migration to v3 * More changes * Remove legacy redirects * Fail when there is no ENABLE_VC_BUILD * Fix edge * Updated readme * Changeset * Added static mode * Updated documentation * Updated shim * Made edge work! * Updated changeset * Ensure empty dir * Fixed redirects for dynamic paths * Removed extra declaration * Splited imports * Updated readme * Fixed some urls * Deprecated shim! * [test]: Vercel NFT * Beautify * Edge bundle to node 14.19 Vercel runs 14.19.1 (I've checked it manually) * Re-added shim (#3304) * Added `node:` prefix * Use the same bundling as Deno for Edge * Remove esbuild * Fixed shim * Moved nft * Updated changeset * Added note about Edge * fix typo * Added support for Node 16 (vercel/vercel#7772) 2022-05-11Fix APIRoute type (#3344)Gravatar Matthew Phillips 3-11/+8 * Fix APIRoute type * Adds a changeset * Update usage of the two API route signatures 2022-05-11[create-astro] Finalize developer experience... with gradients 🚀 (#3313)Gravatar Ben Holmes 5-23/+123 * wip: port gradient helpers from sandbox ideas * feat: wire up rocket gradient 🚀 * feat: wire up rocket gradient on install step * refactor: update "next steps" wording * deps: add chalk (for rendering gradient) * chore: changeset * chore: clean up sstray template string