Skip to content

Commit

Permalink
Merge pull request #143 from NeetishPathak/dev
Browse files Browse the repository at this point in the history
Docker build changes
  • Loading branch information
NeetishPathak authored Jun 13, 2023
2 parents dfb0ed0 + 4dbf886 commit d306aa5
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/juno_server_docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
build-juno-docker:
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
PROXY_TLS_PORT: 5080
Expand All @@ -28,14 +28,14 @@ jobs:
steps:
- name: Get code
uses: actions/checkout@v3.5.2
- name: Install dependencies
- name: Check openssl version dependencies
run: |
sudo apt install openssl -y
echo "Openssl Version:" `openssl version`
- name: Set up Docker
uses: docker-practice/actions-setup-docker@master
if: ${{ matrix.os == 'macos-latest' }}
- name: Docker Version Check
run: docker version
# - name: Expose GitHub Runtime
# uses: crazy-max/ghaction-github-runtime@v2
- name: Build docker containers
run: docker/build.sh
- name: Start juno containers
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ Continue building JunoDB server with

<!-- toc -->

**Note** :
Docker build supported platforms
- Linux (Ubuntu)
- OS X (macOS)
### <h3 id="docker_install_dependencies">Install Dependencies</h3>
[Install Docker Engine version 20.10.0+](https://docs.docker.com/engine/install/ubuntu/)
Check for existing docker version
Expand Down Expand Up @@ -207,6 +211,10 @@ More about junoload [here](docs/junoload.md)

## Manual Build

**Note** :
Manual build supported platforms
- Linux (Ubuntu 20.04)

The following sections explain the process for manually building the JunoDB server without Docker. These instructions are based on an Ubuntu 20.04.5 system
* [Manual](#manual-build)
* [Install Dependencies](#manual_install_dependencies)
Expand Down
18 changes: 17 additions & 1 deletion docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,23 @@ make image_tag=${image_tag} docker_repo=${docker_repo} source_repo=${source_repo


# Set the app version using image_tag in manifest/.env
sed -i "s#.*VERSION=.*#VERSION=${image_tag}#g" ${wd}/manifest/.env
# Get the kernel name
kernel=$(uname -s)

# Set the sed command based on the operating system
if [[ $kernel == "Linux" ]]; then
sed_command="sed -i 's#.*VERSION=.*#VERSION=${image_tag}#g' ${wd}/manifest/.env"
elif [[ $kernel == "Darwin" ]]; then
sed_command="sed -i '' 's#.*VERSION=.*#VERSION=${image_tag}#g' ${wd}/manifest/.env"
elif [[ $kernel == "CYGWIN"* || $kernel == "MINGW"* ]]; then
sed_command="sed -i 's#.*VERSION=.*#VERSION=${image_tag}#g' ${wd}/manifest/.env"
else
echo "Unknown operating system."
exit 1
fi

# Run the sed command
eval "$sed_command"

# Generate the test secrets to initialize proxy
manifest/config/secrets/gensecrets.sh
Expand Down
2 changes: 1 addition & 1 deletion docker/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:16.04 AS juno-base
FROM ubuntu:20.04 AS juno-base
USER root
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -qq install -y \
cmake \
Expand Down
2 changes: 2 additions & 0 deletions docker/build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
# limitations under the License.
#

set -eo pipefail
cd "$(dirname "$0")"

export CGO_CFLAGS="-I/usr/local/include"
export CGO_LDFLAGS="-L/usr/local/lib -lrocksdb -lstdc++ -lm -lrt -lpthread -ldl"
Expand Down

0 comments on commit d306aa5

Please sign in to comment.