Skip to content

Commit

Permalink
Create Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jawaidm authored Feb 23, 2023
1 parent c039871 commit c7781bc
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions dockerdev/Dockerfile
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"]

0 comments on commit c7781bc

Please sign in to comment.