2018-03-12 01:35:24 +01:00
|
|
|
# Golang testing image with some tools already installed
|
2020-02-09 14:48:24 +01:00
|
|
|
FROM golang:1.13-alpine
|
2018-03-12 01:35:24 +01:00
|
|
|
|
|
|
|
ENV SEMAPHORE_VERSION="development" SEMAPHORE_ARCH="linux_amd64" \
|
|
|
|
SEMAPHORE_CONFIG_PATH="${SEMAPHORE_CONFIG_PATH:-/etc/semaphore}" \
|
|
|
|
APP_ROOT="/go/src/github.com/ansible-semaphore/semaphore/"
|
|
|
|
|
2018-04-11 20:05:38 +02:00
|
|
|
RUN apk add --no-cache git mysql-client python py-pip py-openssl openssl ca-certificates curl curl-dev openssh-client tini nodejs nodejs-npm bash rsync && \
|
2020-02-09 14:48:24 +01:00
|
|
|
apk --update add --virtual build-dependencies python-dev libffi-dev openssl-dev build-base &&\
|
|
|
|
rm -rf /var/cache/apk/*
|
|
|
|
|
|
|
|
RUN pip install --upgrade pip cffi && \
|
|
|
|
pip install ansible &&\
|
|
|
|
apk del build-dependencies
|
|
|
|
|
|
|
|
RUN adduser -D -u 1002 -g 0 semaphore && \
|
2018-03-12 01:35:24 +01:00
|
|
|
mkdir -p /go/src/github.com/ansible-semaphore/semaphore && \
|
|
|
|
mkdir -p /tmp/semaphore && \
|
|
|
|
mkdir -p /etc/semaphore && \
|
|
|
|
chown -R semaphore:0 /go && \
|
|
|
|
chown -R semaphore:0 /tmp/semaphore && \
|
|
|
|
chown -R semaphore:0 /etc/semaphore && \
|
|
|
|
ssh-keygen -t rsa -q -f "/root/.ssh/id_rsa" -N "" && \
|
2020-02-09 14:48:24 +01:00
|
|
|
ssh-keyscan -H github.com > /root/.ssh/known_hosts
|
|
|
|
|
|
|
|
RUN cd $(go env GOPATH) && curl -sL https://taskfile.dev/install.sh | sh
|
2018-03-12 01:35:24 +01:00
|
|
|
|
|
|
|
# Copy in app source
|
|
|
|
WORKDIR ${APP_ROOT}
|
|
|
|
COPY . ${APP_ROOT}
|
|
|
|
RUN deployment/docker/dev/bin/install
|
|
|
|
|
2018-10-20 13:56:32 +02:00
|
|
|
USER 1000
|
2018-03-12 01:35:24 +01:00
|
|
|
EXPOSE 3000
|
2018-10-20 13:56:32 +02:00
|
|
|
|
2020-02-09 14:48:24 +01:00
|
|
|
CMD ["task", "watch"]
|