-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile.wheel and Makefile for packaging (#86)
* Add Dockerfile.wheel and Makefile for packaging * Use Artifactory 3.8 base image * Readme: Fix typo * Add building instructions * Autoremove byte order mark
- Loading branch information
Showing
3 changed files
with
41 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM python:3.8-buster | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
build-essential \ | ||
gperf \ | ||
software-properties-common | ||
|
||
ENV SRC_DIR /opt/snudown | ||
ENV WHEEL_OUTPUT_DIR /tmp/dist | ||
|
||
RUN mkdir -p $SRC_DIR $WHEEL_OUTPUT_DIR | ||
WORKDIR $SRC_DIR | ||
|
||
ADD . $SRC_DIR | ||
CMD pip3 wheel --wheel-dir=$WHEEL_OUTPUT_DIR . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
PACKAGE := snudown | ||
VERSION := 1.6.0 | ||
DOCKERFILE := Dockerfile.wheel | ||
|
||
default: build run | ||
|
||
build: | ||
docker build \ | ||
-t $(PACKAGE):$(VERSION) \ | ||
-f $(DOCKERFILE) \ | ||
. | ||
|
||
run: | ||
mkdir -p dist | ||
docker run \ | ||
--rm \ | ||
-v `pwd`/dist:/tmp/dist \ | ||
-it \ | ||
$(PACKAGE):$(VERSION) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters