-
Notifications
You must be signed in to change notification settings - Fork 12
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
Showing
1 changed file
with
38 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,38 @@ | ||
# Prepare the base environment. | ||
FROM dbcawa/mooringlicensing:latest as builder_base_dockerdev | ||
|
||
RUN apt-get update | ||
RUN apt-get install --no-install-recommends -y patch | ||
RUN apt-get install --no-install-recommends -y libpq-dev git ssh sudo | ||
RUN apt-get install --no-install-recommends -y screen | ||
RUN apt-get install --no-install-recommends -y virtualenv | ||
RUN openssl req -new -newkey rsa:4096 -days 3650 -nodes -x509 -subj "/C=AU/ST=Western Australia/L=Perth/O=Development Environment/OU=IT Department/CN=example.com" -keyout /etc/ssl/private/selfsignedssl.key -out /etc/ssl/private/selfsignedssl.crt | ||
|
||
RUN echo 'if ! [ -n "${SUDO_USER}" -a -n "${SUDO_PS1}" ]; then' >> /etc/bash.bashrc | ||
RUN echo "export PS1='\e[0;31mdev:\e[m \e[0;32m\${debian_chroot:+(\$debian_chroot)}\u@\h:\w\$\e[m '" >> /etc/bash.bashrc | ||
RUN echo "fi" >> /etc/bash.bashrc | ||
|
||
# For windows | ||
RUN groupadd -g 1000 docker | ||
RUN useradd -g 1000 -u 1000 docker -s /bin/bash | ||
RUN mkdir /home/docker | ||
RUN chown docker.docker /home/docker | ||
RUN cp /root/.bashrc /home/docker | ||
RUN cp /root/.profile /home/docker | ||
|
||
# For Linux | ||
RUN groupadd -g 20000 container | ||
RUN useradd -g 20000 -u 200000 container -s /bin/bash | ||
|
||
RUN mkdir /home/container | ||
RUN chown container.container /home/container | ||
RUN cp /root/.bashrc /home/container | ||
RUN cp /root/.profile /home/container | ||
|
||
|
||
|
||
|
||
|
||
EXPOSE 8080 | ||
HEALTHCHECK --interval=1m --timeout=5s --start-period=10s --retries=3 CMD ["wget", "-q", "-O", "-", "http://localhost:8080/"] | ||
CMD ["/startup.sh"] |