gocd / docker-gocd-agent

GoCD Agent Docker image
https://hub.docker.com/r/gocd/
47 stars 37 forks source link

Provide latest fedora as an image #57

Closed fire closed 6 years ago

fire commented 6 years ago

Since I'm having mingw64 issues building with godot game engine, it would be helpful to have a Fedora gocd agent image.

ketan commented 6 years ago

Since fedora is very similar to centos, would you mind submitting a PR to build a fedora image? It'd be as simple as adding a section similar to this https://github.com/gocd/docker-gocd-agent/blob/5c7016aa6f19b1ae4e201b8a2de4e79e072d383b/Rakefile#L204-L214

For all you know, it could be identical even. The building instructions are here

fire commented 6 years ago

Just copying the centos steps worked, but I'm currently busy until the weekend.

fire commented 6 years ago

Should be like

,
  {
    distro: 'fedora',
    version: '27',
    add_files: tini_and_gosu_add_file_meta,
    create_user_and_group: create_user_and_group_cmd,
    before_install: [
      'yum update -y',
      'yum install -y java-1.8.0-openjdk-headless git mercurial subversion openssh-clients bash unzip curl',
      'yum clean all'
    ]
  }

but it wants to git clone --quiet "https://github.com/gocd/docker-gocd-agent-fedora-27" build/docker-gocd-agent-fedora-27

fire commented 6 years ago

Should be using

# Copyright 2017 ThoughtWorks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

###############################################################################################
# This file is autogenerated by the repository at https://github.com/gocd/docker-gocd-agent.
# Please file any issues or PRs at https://github.com/gocd/docker-gocd-agent
###############################################################################################

FROM fedora:27
MAINTAINER GoCD <go-cd-dev@googlegroups.com>

LABEL gocd.version="18.1.0" \
  description="GoCD agent based on fedora version 27" \
  maintainer="GoCD <go-cd-dev@googlegroups.com>" \
  gocd.full.version="18.1.0-5937" \
  gocd.git.sha="8a847b96ee8d38173f80178ed1285f0e53a970e0"

ADD https://github.com/krallin/tini/releases/download/v0.16.1/tini-static-amd64 /usr/local/sbin/tini
ADD https://github.com/tianon/gosu/releases/download/1.10/gosu-amd64 /usr/local/sbin/gosu

# force encoding
ENV LANG=en_US.utf8

ARG UID=1000
ARG GID=1000

RUN \
# add mode and permissions for files we added above
  chmod 0755 /usr/local/sbin/tini && \
  chown root:root /usr/local/sbin/tini && \
  chmod 0755 /usr/local/sbin/gosu && \
  chown root:root /usr/local/sbin/gosu && \
# add our user and group first to make sure their IDs get assigned consistently,
# regardless of whatever dependencies get added
  groupadd -g ${GID} go && \ 
  useradd -u ${UID} -g go -d /home/go -m go && \
  yum update -y && \
  yum install -y java-1.8.0-openjdk-headless git mercurial subversion openssh-clients bash unzip curl && \
  yum clean all && \
# download the zip file
  curl --fail --location --silent --show-error "https://download.gocd.org/binaries/18.1.0-5937/generic/go-agent-18.1.0-5937.zip" > /tmp/go-agent.zip && \
# unzip the zip file into /go-agent, after stripping the first path prefix
  unzip /tmp/go-agent.zip -d / && \
  mv go-agent-18.1.0 /go-agent && \
  rm /tmp/go-agent.zip && \
  mkdir -p /docker-entrypoint.d

# ensure that logs are printed to console output
COPY agent-bootstrapper-logback-include.xml /go-agent/config/agent-bootstrapper-logback-include.xml
COPY agent-launcher-logback-include.xml /go-agent/config/agent-launcher-logback-include.xml
COPY agent-logback-include.xml /go-agent/config/agent-logback-include.xml

ADD docker-entrypoint.sh /

ENTRYPOINT ["/docker-entrypoint.sh"]
arvindsv commented 6 years ago

Closing. Open a PR, if needed, please. Thank you!