dockerization
the build was successful Details

This commit is contained in:
Jan Christian Grünhage 2018-06-17 16:48:25 +02:00
parent 885273716e
commit 1e320a0683
7 changed files with 39 additions and 0 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
target

7
.drone.yml Normal file
View File

@ -0,0 +1,7 @@
pipeline:
docker:
image: docker.io/plugins/docker
repo: docker.jcg.re/roomnamebot
registry: docker.jcg.re
secrets: [ docker_username, docker_password ]
autotag: true

22
Dockerfile Normal file
View File

@ -0,0 +1,22 @@
FROM docker.io/alpine:edge as builder
COPY . /src
RUN apk add --no-cache \
cargo \
build-base \
openssl-dev \
&& cd /src \
&& cargo build --release
FROM docker.io/alpine:edge
ENV UID=1337 \
GID=1337
COPY --from=builder /src/target/release/roomnamebot /usr/local/bin/roomnamebot
RUN apk add --no-cache \
libssl1.0 \
libgcc \
ca-certificates \
s6 \
su-exec
COPY docker/root /
CMD ["/bin/s6-svscan", "/etc/s6.d/"]

View File

@ -0,0 +1,4 @@
#!/bin/sh
cd /data
chown -R ${UID}:${GID} .
exec su-exec ${UID}:${GID} roomnamebot

View File

@ -0,0 +1 @@
#!/bin/sh

View File

@ -0,0 +1,2 @@
#!/bin/sh
s6-svc -O /etc/s6.d/cron

2
docker/root/etc/s6.d/cron/run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec crond -f