-
Notifications
You must be signed in to change notification settings - Fork 281
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
15 additions
and
17 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 |
---|---|---|
@@ -1,21 +1,20 @@ | ||
|
||
FROM golang:1.23.1-bookworm | ||
FROM golang:1.23-alpine3.18 | ||
|
||
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/" | ||
|
||
RUN apt -qq update && apt -qq --no-install-recommends install -y gcc g++ make git mariadb-client python3 pip python3-openssl openssl ca-certificates libcurl4-openssl-dev openssh-client tini nodejs bash rsync python3-dev libffi-dev python3-paramiko &&\ | ||
apt-get -qq install -y curl | ||
|
||
# hadolint ignore=DL3013 | ||
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - | ||
|
||
RUN apt update && apt install -y gcc g++ make git mariadb-client python3 pip python3-openssl openssl ca-certificates curl libcurl4-openssl-dev openssh-client tini nodejs bash rsync && \ | ||
apt install -y python3-dev libffi-dev python3-paramiko &&\ | ||
rm -rf /var/cache/apt/* | ||
|
||
RUN VER=`python3 -c 'import sys; val=sys.version_info;print(str(val.major)+"."+str(val.minor))'` ; \ | ||
rm -rf /usr/lib/python$VER/EXTERNALLY-MANAGED && \ | ||
pip3 install --upgrade pip cffi &&\ | ||
pip3 install ansible && pip3 install ansible-pylibssh | ||
pip3 install ansible && \ | ||
pip3 install ansible-pylibssh | ||
|
||
RUN adduser --disabled-password -u 1002 --gecos 0 semaphore && \ | ||
mkdir -p /go/src/github.com/ansible-semaphore/semaphore && \ | ||
|
@@ -26,24 +25,23 @@ RUN adduser --disabled-password -u 1002 --gecos 0 semaphore && \ | |
chown -R semaphore:0 /tmp/semaphore && \ | ||
chown -R semaphore:0 /etc/semaphore && \ | ||
chown -R semaphore:0 /var/lib/semaphore && \ | ||
ssh-keygen -t rsa -q -f "/root/.ssh/id_rsa" -N "" && \ | ||
ssh-keygen -t rsa -q -f "/root/.ssh/id_rsa" -N "" && \ | ||
ssh-keyscan -H github.com > /root/.ssh/known_hosts | ||
|
||
RUN cd $(go env GOPATH) && curl -sL https://taskfile.dev/install.sh | sh -s -- "v3.33.0" | ||
|
||
|
||
RUN npm install -g [email protected] | ||
RUN cd $(go env GOPATH) && \ | ||
curl -sL https://taskfile.dev/install.sh | sh -s -- "v3.33.0" && \ | ||
npm install --production -g [email protected] | ||
|
||
RUN git config --global --add safe.directory /go/src/github.com/ansible-semaphore/semaphore | ||
|
||
# Copy in app source | ||
WORKDIR ${APP_ROOT} | ||
ARG source=https:/ansible-semaphore/semaphore.git | ||
ARG release=v2.8.90 | ||
|
||
RUN git clone -qq --depth 1 --single-branch --branch ${release} ${source} ./ | ||
ARG SOURCE=https:/ansible-semaphore/semaphore.git | ||
ARG RELEASE=v2.8.90 | ||
|
||
RUN deployment/docker/ci/bin/install | ||
RUN git clone -qq --depth 1 --single-branch --branch ${RELEASE} ${SOURCE} ./ && \ | ||
deployment/docker/ci/bin/install && \ | ||
apt-get clean | ||
|
||
USER semaphore | ||
EXPOSE 3000 | ||
|