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 #271

Open
wants to merge 1 commit into
base: master
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
103 changes: 103 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Exclude docker related files so that the docker layer cache won't be
# invalidated when editing them because the build context changes.
Dockerfile
.dockerignore

# Created by https://www.gitignore.io/api/macos

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# End of https://www.gitignore.io/api/macos

# Created by https://www.gitignore.io/api/c

### C ###
# Prerequisites
*.d

# Object files
*.o
*.ko
*.obj
*.elf

# Linker output
*.ilk
*.map
*.exp

# Precompiled Headers
*.gch
*.pch

# Libraries
*.lib
*.a
*.la
*.lo

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

# Debug files
*.dSYM/
*.su
*.idb
*.pdb

# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf

# End of https://www.gitignore.io/api/c

autom4te.cache
autoscan.log
Makefile
config.log
config.status
configure.scan
config.h
sysroot/
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ubuntu:20.04 as build-stage
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y
# Install build dependencies
RUN apt-get install -y git
RUN apt-get install -y build-essential
RUN apt-get install -y python python3
RUN apt-get install -y autoconf automake libtool
RUN apt-get install -y libc++-10-dev libc++abi-10-dev
RUN apt-get install -y lsb-release wget software-properties-common
RUN wget https://apt.llvm.org/llvm.sh
RUN chmod +x llvm.sh
RUN ./llvm.sh 10 # version 10
# Build libwally-core
COPY . /libwally-core
WORKDIR /libwally-core
RUN git submodule update --init --recursive
ENV CC="clang-10" CXX="clang++-10"
RUN ./tools/autogen.sh
RUN ./configure --disable-clear-tests
RUN make
RUN make check
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ $ make
$ make check
```

### Building with Docker

[Install docker](https://docs.docker.com/get-docker/) and run:

```bash
# Build an Ubuntu image with the library and run tests
$ docker build -t libwally-core .
```

### Building on macOS

Using homebrew,
Expand Down