Created
May 4, 2016 19:58
-
-
Save nenodias/67d612b29c9ca1947b9327a757cc97ac to your computer and use it in GitHub Desktop.
Dockerfile - Postgres + Firebird ( Testing )
This file contains hidden or 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
# O FROM serve para indicar a imagem utilizada como base. | |
FROM debian:wheezy | |
# MAINTAINER é quem cria a imagem. | |
MAINTAINER Horácio Dias Baptista Neto <[email protected]> | |
# O RUN executa comandos durante o build, que serão | |
# refletidos na imagem final. Há várias formas de passar | |
# os parâmetros, eu costumo utilizar esta: | |
## Vamos atualizar o APT. | |
RUN ["apt-get", "update"] | |
## E instalar o Inkscape | |
RUN ["apt-get", "install", "-y", "sudo", "git", "mercurial","python3", "python3-pip", "build-essential", "postgresql-server-dev-all", "postgresql-9.1", "libfreetype6-dev", "libxml2-dev", "libxslt-dev", "cmake", "python3-numpy", "firebird-dev", "firebird2.5-classic*"] | |
RUN ["service", "postgresql", "restart"] | |
RUN ["service", "firebird2.5-classic", "restart"] | |
RUN ["sudo", "su", "postgres"] | |
RUN ["psql", "--command=\"alter user postgres with encrypted password 'postgres';\""] | |
RUN ["exit"] | |
## Finalmente vamos criar o login player, não é legal | |
# usar root para tarefas onde não precisamos deste privilégio. | |
# O ID deste usuário deve ser igual o ID da pessoa que executa o contêiner, | |
# que geralmente é 1000. | |
#RUN ["useradd", "player", "-u", "1000", "-g", "100", "-m", "-d", "/home/player", "-s", "/bin/bash"] | |
# USER faz com que você troque o ID que está executando os | |
# comandos a seguir. | |
#USER player | |
# ENTRYPOINT define o comando que executará quando o contêiner | |
# for executado a partir da imagem. | |
#ENTRYPOINT ["/usr/bin/inkscape"] | |
EXPOSE 3050:3051 tcp | |
EXPOSE 5432:5433 tcp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment