Skip to content

Commit

Permalink
dockerfile 추가(임시)
Browse files Browse the repository at this point in the history
  • Loading branch information
cranemont committed Aug 20, 2022
1 parent 77cdd99 commit 839f0d4
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
results
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM ubuntu:20.04

COPY sandbox /sandbox
COPY sources.list /etc/apt/

ENV TZ=Asia/Seoul
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN buildDeps='software-properties-common git libtool cmake python-dev python3-pip libseccomp-dev curl' && \
apt-get update && apt-get install -y build-essential python python3 python-pkg-resources python3-pkg-resources $buildDeps && \
add-apt-repository ppa:ubuntu-toolchain-r/test && \
add-apt-repository ppa:openjdk-r/ppa && \
apt-get update && apt-get install -y openjdk-11-jdk gcc-9 g++-9 && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 40 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 40 && \
cd /sandbox && cmake CMakeLists.txt && make && make install && \
apt-get purge -y --auto-remove $buildDeps && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
useradd -u 12001 compiler && useradd -u 12002 code && useradd -u 12003 spj && usermod -a -G code spj

RUN apt-get update && apt-get install -y wget git vim
RUN wget -P /tmp https://go.dev/dl/go1.19.linux-amd64.tar.gz

RUN tar -C /usr/local -xzf /tmp/go1.19.linux-amd64.tar.gz
RUN rm /tmp/go1.19.linux-amd64.tar.gz

ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
RUN mkdir -p "$GOPATH/src/github.com/cranemont" "$GOPATH/bin" && chmod -R 777 "$GOPATH"

WORKDIR $GOPATH
RUN git clone https://github.com/cranemont/judge-manager $GOPATH/src/github.com/cranemont
49 changes: 49 additions & 0 deletions sources.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirror.kakao.com/ubuntu/ focal main restricted
# deb-src http://mirror.kakao.com/ubuntu/ focal main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirror.kakao.com/ubuntu/ focal-updates main restricted
# deb-src http://mirror.kakao.com/ubuntu/ focal-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://mirror.kakao.com/ubuntu/ focal universe
# deb-src http://mirror.kakao.com/ubuntu/ focal universe
deb http://mirror.kakao.com/ubuntu/ focal-updates universe
# deb-src http://mirror.kakao.com/ubuntu/ focal-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirror.kakao.com/ubuntu/ focal multiverse
# deb-src http://mirror.kakao.com/ubuntu/ focal multiverse
deb http://mirror.kakao.com/ubuntu/ focal-updates multiverse
# deb-src http://mirror.kakao.com/ubuntu/ focal-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirror.kakao.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://mirror.kakao.com/ubuntu/ focal-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partner

deb http://security.ubuntu.com/ubuntu/ focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu/ focal-security main restricted
deb http://security.ubuntu.com/ubuntu/ focal-security universe
# deb-src http://security.ubuntu.com/ubuntu/ focal-security universe
deb http://security.ubuntu.com/ubuntu/ focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu/ focal-security multiverse

0 comments on commit 839f0d4

Please sign in to comment.