trunk
HeNine 3 years ago
parent b13801ced1
commit 470ed91050

4
.gitignore vendored

@ -0,0 +1,4 @@
*.iml
/picc
/release

@ -0,0 +1,9 @@
FROM alpine:3.15
RUN apk update && \
apk upgrade && \
apk add erlang
COPY release/picc picc
CMD ["/picc/bin/picc", "foreground"]

@ -1,3 +1,7 @@
# picc-docker # picc-docker
Docker container construction for picc. Docker container construction for picc.
# Build
Run `build.sh`.

@ -0,0 +1,38 @@
#!/bin/bash
# Directory for to build the release into
if [[ ! -d release ]]; then
mkdir release
fi
# Clone fresh copy of picc
if [[ ! -d "picc" ]]; then
git clone http://git.raptorpond.com/picc/picc.git
else
echo "picc already cloned."
fi
cd picc || exit
git pull
# Fetch rebar
if [[ ! -f "rebar3" ]]; then
curl -LO https://s3.amazonaws.com/rebar3/rebar3
fi
cd ..
# Build picc in a fresh alpine container and deposit the build into /release/
cat <<EOF | docker run --rm -i \
-v "$PWD"/picc:/picc \
-v "$PWD"/release:/release \
alpine:3.15 \
/bin/sh
apk update
apk add erlang-dev
cd /picc
./rebar3 as docker release -o ../release
EOF
docker build -t docker.raptorpond.com/picc .
Loading…
Cancel
Save