Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dockerfile #23

Open
wants to merge 9 commits into
base: new
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git/
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM ubuntu:20.04
RUN \
apt-get update && \
apt-get upgrade -y && \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use ENV DEBIAN_FRONTEND=noninteractive for simplicity.

apt-get install -y build-essential file git
# dependencies for thirdparty cpython
RUN \
sed -i 's/# deb-src http:\/\/archive.ubuntu.com\/ubuntu\/ focal-updates universe/deb-src http:\/\/archive.ubuntu.com\/ubuntu\/ focal-updates universe/' /etc/apt/sources.list && \
apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get build-dep -y python3.9
# dependencies for thirdparty git
RUN \
DEBIAN_FRONTEND="noninteractive" apt-get install -y gettext libcurl4-openssl-dev libexpat-dev libssl-dev tclsh zlib1g-dev
# dependencies for thirdparty libpng
RUN \
apt-get install -y zlib1g-dev
# dependencies for thirdparty sqlite
RUN \
DEBIAN_FRONTEND="noninteractive" apt-get install -y tcl-dev tclsh zlib1g-dev
# dependencies for thirdparty tinycc
RUN \
DEBIAN_FRONTEND="noninteractive" apt-get install -y texinfo
ADD . /opt/chibicc
WORKDIR /opt/chibicc
2 changes: 1 addition & 1 deletion test/thirdparty/cpython.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
repo='git@github.com:python/cpython.git'
repo='https://github.com/python/cpython.git'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worth another PR :)

. test/thirdparty/common
git reset --hard c75330605d4795850ec74fdc4d69aa5d92f76c00

Expand Down
2 changes: 1 addition & 1 deletion test/thirdparty/git.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
repo='git@github.com:git/git.git'
repo='https://github.com/git/git.git'
. test/thirdparty/common
git reset --hard 54e85e7af1ac9e9a92888060d6811ae767fea1bc

Expand Down
2 changes: 1 addition & 1 deletion test/thirdparty/libpng.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
repo='git@github.com:rui314/libpng.git'
repo='https://github.com/rui314/libpng.git'
. test/thirdparty/common
git reset --hard dbe3e0c43e549a1602286144d94b0666549b18e6

Expand Down
2 changes: 1 addition & 1 deletion test/thirdparty/sqlite.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
repo='git@github.com:sqlite/sqlite.git'
repo='https://github.com/sqlite/sqlite.git'
. test/thirdparty/common
git reset --hard 86f477edaa17767b39c7bae5b67cac8580f7a8c1

Expand Down
4 changes: 2 additions & 2 deletions test/thirdparty/tinycc.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
repo='git@github.com:TinyCC/tinycc.git'
repo='https://github.com/TinyCC/tinycc.git'
. test/thirdparty/common
git reset --hard df67d8617b7d1d03a480a28f9f901848ffbfb7ec

./configure --cc=$chibicc
./configure --cc=$chibicc --with-selinux
$make clean
$make
$make CC=cc test