Skip to content

Commit 728e095

Browse files
committed
[WIP] dockerfile for play
1 parent a42f02f commit 728e095

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

play/Dockerfile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
FROM ubuntu:22.04 AS base
2+
3+
SHELL ["/bin/bash", "-c"]
4+
ENV ASDF_DIR=/home/app/.asdf
5+
ENV BASH_ENV=/home/app/.env
6+
7+
RUN groupadd -g 1000 app && \
8+
useradd -g 1000 -u 1000 -m app
9+
10+
RUN apt update && \
11+
apt install -y git curl
12+
13+
USER 1000
14+
RUN git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.13.1
15+
16+
RUN echo '. $HOME/.asdf/asdf.sh' >> ~/.env && \
17+
echo '. $HOME/.asdf/completions/asdf.bash' >> ~/.env && \
18+
echo '. ~/.env' >> ~/.bashrc
19+
20+
21+
FROM base AS build
22+
23+
USER root
24+
25+
RUN apt install -y build-essential libreadline-dev zlib1g-dev libssl-dev libuuid1 uuid-dev unzip
26+
27+
COPY ./ /src
28+
29+
RUN chown -R app:app /src
30+
USER 1000
31+
32+
WORKDIR /src/rolling-shutter
33+
34+
RUN make install-asdf && \
35+
make install-tools && \
36+
make build
37+
38+
RUN go clean -cache -modcache
39+
40+
FROM base AS run
41+
42+
USER root
43+
RUN apt install make
44+
45+
USER 1000
46+
RUN mkdir /home/app/.asdf/installs
47+
COPY --from=build /src /src
48+
COPY --from=build /home/app/.asdf/plugins/ /home/app/.asdf/plugins/
49+
COPY --from=build /home/app/.asdf/installs/babashka/ /home/app/.asdf/installs/babashka/
50+
COPY --from=build /home/app/.asdf/installs/clojure/ /home/app/.asdf/installs/clojure/
51+
COPY --from=build /home/app/.asdf/installs/golang/ /home/app/.asdf/installs/golang/
52+
COPY --from=build /home/app/.asdf/installs/java/ /home/app/.asdf/installs/java/
53+
COPY --from=build /home/app/.asdf/installs/nodejs/ /home/app/.asdf/installs/nodejs/
54+
COPY --from=build /home/app/.asdf/installs/postgres/ /home/app/.asdf/installs/postgres/
55+
COPY --from=build /home/app/.asdf/installs/solidity/ /home/app/.asdf/installs/solidity/
56+
RUN asdf reshim
57+
58+
59+
WORKDIR /src

0 commit comments

Comments
 (0)