-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dockerfile for building a linux build works now. Added an include_tem…
…plates! macro.
- Loading branch information
1 parent
315485e
commit 7984a12
Showing
2 changed files
with
48 additions
and
15 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 |
---|---|---|
@@ -1,17 +1,32 @@ | ||
FROM clux/muslrust | ||
FROM debian:jessie | ||
MAINTAINER Pyry Kontio <[email protected]> | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
libpq-dev \ | ||
sqlite3 \ | ||
--no-install-recommends && \ | ||
rm -rf /var/lib/apt/lists/* | ||
curl \ | ||
git \ | ||
libpq-dev \ | ||
sqlite3 \ | ||
ca-certificates \ | ||
g++ \ | ||
postgresql \ | ||
postgresql-client \ | ||
--no-install-recommends && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN git clone --branch 0.1 https://github.com/golddranks/ganbare.git && cd ganbare | ||
RUN ln -s /lib/x86_64-linux-gnu/libsqlite3.so.0 /lib/x86_64-linux-gnu/libsqlite3.so | ||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly-2016-11-06 | ||
RUN git clone --branch 0.1.1 https://github.com/golddranks/ganbare.git | ||
RUN ln -s /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 /usr/lib/x86_64-linux-gnu/libsqlite3.so | ||
RUN /root/.cargo/bin/cargo install diesel_cli | ||
|
||
ENV RUN DATABASE_URL=postgres://[email protected]/ganbare_testing | ||
ENV GANBARE_DATABASE_URL=postgres://[email protected]/ganbare_testing | ||
ENV GANBARE_BUILDTIME_PEPPER=`cat /dev/urandom | base64 | head -c 42` | ||
ENV DATABASE_URL=postgres://root@%2Fvar%2Frun%2Fpostgresql/ganbare_build | ||
ENV GANBARE_DATABASE_URL=postgres://root@%2Fvar%2Frun%2Fpostgresql/ganbare_build | ||
|
||
RUN cargo install diesel_cli && diesel database setup && cargo build --release | ||
WORKDIR ganbare | ||
|
||
RUN /etc/init.d/postgresql start && \ | ||
su - postgres -c "createuser root; psql -c 'alter user root with createdb'" && \ | ||
bash -l -c "/root/.cargo/bin/diesel database setup;" | ||
|
||
RUN /etc/init.d/postgresql start && \ | ||
bash -l -c "GANBARE_BUILDTIME_PEPPER=`cat /dev/urandom | head -c 32 | base64` \ | ||
/root/.cargo/bin/cargo build --release" |
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