Skip to content

Commit 6624457

Browse files
stevemcquaidcernekee
authored andcommitted
Add Dockerfiles
bug #48
1 parent c948387 commit 6624457

File tree

4 files changed

+59
-0
lines changed

4 files changed

+59
-0
lines changed

docker/Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update
4+
RUN apt-get install -y \
5+
libgtk-3-dev \
6+
libtomcrypt-dev \
7+
libxml2-dev \
8+
autoconf \
9+
automake \
10+
libtool \
11+
build-essential \
12+
git
13+
14+
RUN git clone git://github.com/cernekee/stoken
15+
16+
WORKDIR stoken
17+
18+
RUN bash autogen.sh && \
19+
./configure && \
20+
make && \
21+
make check && \
22+
make install && \
23+
ldconfig
24+
25+
CMD stoken

docker/Makefile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## Build container
2+
build:
3+
@bash -x scripts/build.sh
4+
5+
## Push container
6+
push:
7+
@bash -x scripts/push.sh
8+
9+
## Run project
10+
run:
11+
@bash -x scripts/run.sh
12+
13+
help:
14+
@printf "Available targets:\n\n"
15+
@awk '/^[a-zA-Z\-\_0-9%:\\]+:/ { \
16+
helpMessage = match(lastLine, /^## (.*)/); \
17+
if (helpMessage) { \
18+
helpCommand = $$1; \
19+
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
20+
gsub("\\\\", "", helpCommand); \
21+
gsub(":+$$", "", helpCommand); \
22+
printf " \x1b[32;01m%-35s\x1b[0m %s\n", helpCommand, helpMessage; \
23+
} \
24+
} \
25+
{ lastLine = $$0 }' $(MAKEFILE_LIST) | sort -u
26+
@printf "\n"

docker/scripts/build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
docker build -t stevemcquaid/stoken:latest .

docker/scripts/run.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
docker run --interactive --tty --volume $HOME:/root \
4+
stevemcquaid/stoken:latest stoken $@

0 commit comments

Comments
 (0)