-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f5b43fe
commit 04b00e0
Showing
3 changed files
with
61 additions
and
0 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,49 @@ | ||
FROM ubuntu:20.04 as build | ||
ARG TARGETPLATFORM | ||
LABEL maintainer="[email protected]" | ||
|
||
EXPOSE 7000 | ||
|
||
ENV TZ=America/Los_Angeles | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
||
RUN apt-get update | ||
|
||
RUN apt-get -y install curl net-tools jq netcat unzip wget git vim fail2ban imagemagick-6.q16 ffmpeg build-essential sqlite3 npm | ||
|
||
RUN apt-get -y upgrade | ||
|
||
RUN npm install --global yarn | ||
RUN npm install -g n | ||
RUN n stable | ||
|
||
RUN mkdir /app | ||
|
||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCHITECTURE=amd64; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCHITECTURE=arm64; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCHITECTURE=aarch64; else ARCHITECTURE=unsupported; fi \ | ||
&& wget -P /app https://go.dev/dl/go1.22.2.linux-${ARCHITECTURE}.tar.gz \ | ||
&& tar -C /usr/local -xzf /app/go1.22.2.linux-${ARCHITECTURE}.tar.gz | ||
|
||
RUN git clone https://github.com/balzack/databag.git /app/databag | ||
|
||
RUN yarn config set network-timeout 300000 | ||
RUN yarn --cwd /app/databag/net/web install | ||
RUN yarn --cwd /app/databag/net/web build | ||
RUN cd /app/databag/net/server; /usr/local/go/bin/go build databag | ||
|
||
RUN mkdir /opt/databag | ||
|
||
ADD transform /opt/databag/transform | ||
|
||
RUN mkdir -p /var/lib/databag | ||
|
||
RUN echo 'export PATH=$PATH:/usr/local/go/bin' >> /root/.bashrc | ||
RUN echo "set expandtab\nset tabstop=2\nset softtabstop=2\nset shiftwidth=2\nset encoding=utf-8\nset fileencoding=utf-8\n" > /root/.vimrc | ||
RUN echo "bind 'set mark-symlinked-directories on'" >> /root/.bashrc | ||
|
||
ADD entrypoint.sh /app | ||
|
||
FROM scratch | ||
COPY --from=build / / | ||
|
||
ENTRYPOINT ["/app/entrypoint.sh"] | ||
|
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,12 @@ | ||
version: "3.9" | ||
services: | ||
databag: | ||
environment: | ||
- DEV=1 | ||
container_name: databag | ||
image: balzack/databag:dev | ||
ports: | ||
- "7000:7000" | ||
volumes: | ||
- ./databag-data:/var/lib/databag | ||
|
File renamed without changes.