-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
144ff82
commit 2558c03
Showing
5 changed files
with
111 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,79 @@ | ||
FROM colemancda/swift-armv7 | ||
FROM swift:5.7.1-jammy | ||
|
||
# Copy everything | ||
COPY . . | ||
# Install needed packages and setup non-root user. | ||
ARG USERNAME=vscode | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
COPY .devcontainer/library-scripts/common-debian.sh /tmp/library-scripts/ | ||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& /bin/bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "true" \ | ||
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/library-scripts | ||
|
||
# Copy Debian sysroot | ||
#COPY ./bullseye-armv7 /workspaces/swift-armv7/bullseye-armv7 | ||
# Node.js version: none, lts/*, 16, 14, 12, 10 | ||
ARG NODE_VERSION="lts/*" | ||
ENV NVM_DIR=/usr/local/share/nvm | ||
ENV NVM_SYMLINK_CURRENT=true \ | ||
PATH=${NVM_DIR}/current/bin:${PATH} | ||
COPY .devcontainer/library-scripts/node-debian.sh /tmp/library-scripts/ | ||
RUN bash /tmp/library-scripts/node-debian.sh "${NVM_DIR}" "${NODE_VERSION}" "${USERNAME}" \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/library-scripts | ||
|
||
# Copy Swift runtime | ||
#COPY ./build/swift-linux-armv7-install /workspaces/swift-armv7/build/swift-linux-armv7-install | ||
# Install dependencies | ||
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \ | ||
apt-get -q update && \ | ||
apt-get -q install -y \ | ||
wget \ | ||
curl \ | ||
build-essential \ | ||
bash \ | ||
bc \ | ||
binutils \ | ||
bzip2 \ | ||
cpio \ | ||
g++ \ | ||
gcc \ | ||
git \ | ||
gzip \ | ||
libncurses5-dev \ | ||
make \ | ||
mercurial \ | ||
whois \ | ||
patch \ | ||
perl \ | ||
python3 \ | ||
rsync \ | ||
sed \ | ||
tar \ | ||
unzip \ | ||
cmake \ | ||
gnupg \ | ||
gnupg2 \ | ||
libc6-dev \ | ||
libcurl4-openssl-dev \ | ||
libedit2 \ | ||
libgcc-9-dev \ | ||
libpython3.8 \ | ||
libsqlite3-0 \ | ||
libstdc++-9-dev \ | ||
libxml2-dev \ | ||
libz3-dev \ | ||
pkg-config \ | ||
tzdata \ | ||
zlib1g-dev \ | ||
&& rm -r /var/lib/apt/lists/* | ||
|
||
# Copy scripts | ||
COPY . /usr/src/swift-armv7 | ||
|
||
# Set environment | ||
ENV SRC_ROOT=/usr/src/swift-armv7 | ||
|
||
# Generate destination.json | ||
RUN cd $SRC_ROOT && \ | ||
$SRC_ROOT/generate-swiftpm-toolchain.sh | ||
|
||
# Fetch Debian 11 armhf sysroot and Swift runtime | ||
RUN cd $SRC_ROOT && \ | ||
export DOWNLOAD_SWIFT_RUNTIME=1 && \ | ||
$SRC_ROOT/fetch-binaries.sh && \ | ||
rm -rf $SRC_ROOT/build/swift-armv7.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters