Skip to content

Commit

Permalink
Ubuntu 20.04 Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
riptl committed Mar 30, 2024
1 parent 92a380c commit 2911871
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/**
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
test/self_test
.vscode/
/dist/
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ RUSTFLAGS+=-Ctarget-feature=-crt-static
CC:=clang

CARGO?=cargo
DOCKER?=docker

.PHONY: build clean
.PHONY: build clean dist

build:
RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target x86_64-unknown-linux-gnu --release --lib
Expand All @@ -22,3 +23,10 @@ test/self_test: test/self_test.c

clean:
$(CARGO) clean

dist:
mkdir -pv dist && \
IMAGE=`$(DOCKER) build -q -f ubuntu2004.Dockerfile .` && \
CONTAINER=`$(DOCKER) create $$IMAGE` && \
$(DOCKER) cp $$CONTAINER:/app/target/x86_64-unknown-linux-gnu/release/libsolfuzz_agave.so dist/ && \
$(DOCKER) rm $$CONTAINER
11 changes: 11 additions & 0 deletions ubuntu2004.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM ubuntu:20.04
RUN apt-get update
RUN apt-get install -y \
build-essential \
curl \
protobuf-compiler
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain none
ENV PATH="/root/.cargo/bin:${PATH}"
COPY . /app
WORKDIR /app
RUN make

0 comments on commit 2911871

Please sign in to comment.