Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

adding docker file #1106

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
32 changes: 32 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright (c) Facebook, Inc. and its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
version: '3.5'

services:
ubuntu-cpp:
# Usage:
# docker-compose build ubuntu-cpp
# docker-compose run --rm ubuntu-cpp
image: ubuntu:20.04
build:
context: .
dockerfile: tools/ubuntu-20.04-cpp.dockerfile
command: &cpp-command >
/bin/bash -c "which java && java -version"






29 changes: 29 additions & 0 deletions tools/ubuntu-20.04-cpp.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (c) Facebook, Inc. and its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ARG base=amd64/ubuntu:20.04
# Set a default timezone, can be overriden via ARG
ARG tz="Asia/Shanghai"

FROM ${base}

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y install sudo \
maven build-essential cmake ccache libboost-all-dev openjdk-8-jdk

# TZ and DEBIAN_FRONTEND="noninteractive"
# are required to avoid tzdata installation
# to prompt for region selection.
ENV DEBIAN_FRONTEND="noninteractive" TZ=${tz}