-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile.development
66 lines (47 loc) · 2.18 KB
/
Dockerfile.development
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
LABEL maintainer="[email protected]"
RUN apt update
RUN apt upgrade -y
RUN apt install -y nginx maven
#git && \
# rm -rf /var/lib/apt/lists/* && \
# apt clean
RUN apt install -y git wget apt-transport-https gnupg curl sudo tmux emacs mysql-client nano htop zsh tzdata
RUN ln -fs /usr/share/zoneinfo/Europe/Stockholm /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata
RUN mkdir -p /etc/apt/keyrings
RUN wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | tee /etc/apt/keyrings/adoptium.asc
RUN echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list
RUN apt-get update
RUN apt install -y temurin-17-jdk
RUN useradd -ms /bin/bash bubify
RUN usermod -aG sudo bubify
RUN echo "bubify ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
WORKDIR /home/bubify
USER bubify
RUN mkdir -p au_backups
RUN mkdir -p profile_pictures
RUN mkdir -p keystore
RUN mkdir -p backend
RUN mkdir -p backend/target
RUN mkdir -p logs
# Setup intermediate certificate -- only needed for deployment
WORKDIR /home/bubify/keystore
RUN keytool -genkeypair -alias tomcat -keyalg RSA -keysize 2048 -keystore keystore.jks -validity 3650 -storepass password -dname "cn=Unknown, ou=Unknown, o=Unknown, c=Unknown"
RUN keytool -genkeypair -alias tomcat -keyalg RSA -keysize 2048 -storetype PKCS12 -keystore keystore.p12 -validity 3650 -storepass password -dname "cn=Unknown, ou=Unknown, o=Unknown, c=Unknown"
ENV AU_KEY_ALIAS=tomcat
ENV AU_KEY_STORE=/home/bubify/keystore/keystore.p12
ENV AU_KEY_STORE_PASSWORD=password
ENV AU_KEY_STORE_TYPE=PKCS12
ENV AU_PROFILE_PICTURE_DIR=/home/bubify/profile_pictures/
ENV AU_BACKUP_DIR=/home/bubify/au_backups/
WORKDIR /home/bubify
COPY --chown=bubify:bubify start_development.sh /home/bubify
COPY --chown=bubify:bubify github_invite.sh /home/bubify
COPY --chown=bubify:bubify github_invite_accepted_actions.sh /home/bubify
RUN chmod +x start_development.sh
RUN chmod +x github_invite.sh
RUN chmod +x github_invite_accepted_actions.sh
EXPOSE 8900
CMD ["./start_development.sh"]