mirror of
https://github.com/balzack/databag.git
synced 2025-02-11 19:19:16 +00:00
reducing docker image size further
This commit is contained in:
parent
fa9c08222d
commit
3d6699381a
@ -41,12 +41,24 @@ RUN echo "set expandtab\nset tabstop=2\nset softtabstop=2\nset shiftwidth=2\nset
|
||||
RUN echo "bind 'set mark-symlinked-directories on'" >> /root/.bashrc
|
||||
|
||||
ADD entrypoint.sh /app
|
||||
ADD dev_setup.sh /app
|
||||
|
||||
RUN rm -rf /usr/local/go
|
||||
RUN rm -rf /root/go
|
||||
RUN rm -rf /app/go*
|
||||
RUN rm -rf /root/.cache/go*
|
||||
|
||||
RUN yarn cache clean
|
||||
RUN rm -rf /app/databag/app
|
||||
RUN rm -rf /app/databag/net/web/node_modules
|
||||
RUN rm -rf /var/lib/apt/lists
|
||||
|
||||
RUN apt-get -y remove git build-essential npm
|
||||
RUN n prune
|
||||
RUN npm uninstall -g n
|
||||
RUN rm -rf /usr/local/n
|
||||
RUN rm -rf /usr/local/bin/node
|
||||
|
||||
RUN apt-get -y remove git build-essential npm vim nodejs
|
||||
RUN rm -rf /var/lib/apt/lists
|
||||
|
||||
FROM scratch
|
||||
COPY --from=build / /
|
||||
|
20
net/container/dev_setup.sh
Executable file
20
net/container/dev_setup.sh
Executable file
@ -0,0 +1,20 @@
|
||||
cd /root
|
||||
wget -P /app https://go.dev/dl/go1.18.10.linux-amd64.tar.gz
|
||||
tar -C /usr/local -xzf /app/go1.18.10.linux-amd64.tar.gz
|
||||
|
||||
apt-get update
|
||||
apt-get -y install git build-essential npm vim
|
||||
|
||||
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
|
||||
apt install -y nodejs
|
||||
|
||||
npm install --global yarn
|
||||
npm install -g n
|
||||
n stable
|
||||
|
||||
cd /app/databag
|
||||
git checkout .
|
||||
|
||||
yarn --cwd /app/databag/net/web install
|
||||
yarn --cwd /app/databag/net/web build
|
||||
cd /app/databag/net/server; /usr/local/go/bin/go build databag
|
@ -18,5 +18,5 @@ if [ "$DEV" == "1" ]; then
|
||||
done
|
||||
else
|
||||
cd /app/databag/net/server
|
||||
/usr/local/go/bin/go run databag -p 7000 -w /app/databag/net/web/build -s /var/lib/databag -t /opt/databag/transform
|
||||
./databag -p 7000 -w /app/databag/net/web/build -s /var/lib/databag -t /opt/databag/transform
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user