Skip to content

Commit b2696f6

Browse files
committed
[docker-base]: unsubmodule docker-base.
Convert docker-base from submodule into a regular directory.
1 parent 53a9792 commit b2696f6

File tree

7 files changed

+152
-4
lines changed

7 files changed

+152
-4
lines changed

.gitmodules

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[submodule "docker-base"]
2-
path = dockers/docker-base
3-
url = https://github.com/Azure/sonic-docker-base.git
41
[submodule "sonic-swss-common"]
52
path = src/sonic-swss-common
63
url = https://github.com/Azure/sonic-swss-common

dockers/docker-base

-1
This file was deleted.

dockers/docker-base/Dockerfile

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
FROM debian:jessie
2+
3+
## Clean documentation in FROM image
4+
RUN find /usr/share/doc -depth \( -type f -o -type l \) ! -name copyright | xargs rm || true
5+
## Clean doc directories that are empty or only contain empty directories
6+
RUN while [ -n "$(find /usr/share/doc -depth -type d -empty -print -exec rmdir {} +)" ]; do :; done
7+
RUN rm -rf \
8+
/usr/share/man/* \
9+
/usr/share/groff/* \
10+
/usr/share/info/* \
11+
/usr/share/lintian/* \
12+
/usr/share/linda/* \
13+
/var/cache/man/* \
14+
/usr/share/locale/*
15+
16+
## Set the apt source
17+
COPY sources.list /etc/apt/sources.list
18+
COPY dpkg_01_drop /etc/dpkg/dpkg.cfg.d/01_drop
19+
RUN apt-get clean && apt-get update
20+
21+
## Pre-install the fundamental packages
22+
RUN apt-get -y install \
23+
rsyslog \
24+
vim-tiny \
25+
perl \
26+
python
27+
28+
COPY rsyslog.conf /etc/rsyslog.conf
29+
30+
RUN apt-get -y purge \
31+
exim4 \
32+
exim4-base \
33+
exim4-config \
34+
exim4-daemon-light
35+
36+
## Clean up apt
37+
## Remove /var/lib/apt/lists/*, could be obsoleted for derived images
38+
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y; \
39+
rm -rf /var/lib/apt/lists/*; \
40+
rm -rf /tmp/*;
41+

dockers/docker-base/LICENSE

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Copyright 2016 Microsoft, Inc.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+

dockers/docker-base/dpkg_01_drop

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Drop unnecessary files
2+
## ref: https://wiki.ubuntu.com/ReducingDiskFootprint
3+
4+
## Documentation
5+
path-exclude /usr/share/doc/*
6+
# we need to keep copyright files for legal reasons
7+
path-include /usr/share/doc/*/copyright
8+
path-exclude /usr/share/man/*
9+
path-exclude /usr/share/groff/*
10+
path-exclude /usr/share/info/*
11+
# lintian stuff is small, but really unnecessary
12+
path-exclude /usr/share/lintian/*
13+
path-exclude /usr/share/linda/*
14+
15+
## Translations
16+
path-exclude /usr/share/locale/*
17+
18+
## Landscape
19+
path-exclude /usr/share/pyshared/twisted/test*
20+
path-exclude /usr/lib/python*/dist-packages/twisted/test*
21+
path-exclude /usr/share/pyshared/twisted/*/test*
22+
path-exclude /usr/lib/python*/dist-packages/twisted/*/test*

dockers/docker-base/rsyslog.conf

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
###############################################################################
2+
# Managed by Ansible
3+
# file: ansible/roles/acs/templates/rsyslog.conf.j2
4+
###############################################################################
5+
#
6+
# /etc/rsyslog.conf Configuration file for rsyslog.
7+
#
8+
# For more information see
9+
# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
10+
11+
12+
#################
13+
#### MODULES ####
14+
#################
15+
16+
$ModLoad imuxsock # provides support for local system logging
17+
#$ModLoad imklog # provides kernel logging support
18+
#$ModLoad immark # provides --MARK-- message capability
19+
20+
# provides UDP syslog reception
21+
#$ModLoad imudp
22+
#$UDPServerRun 514
23+
24+
# provides TCP syslog reception
25+
#$ModLoad imtcp
26+
#$InputTCPServerRun 514
27+
28+
29+
###########################
30+
#### GLOBAL DIRECTIVES ####
31+
###########################
32+
#Set remote syslog server
33+
*.* @127.0.0.1:514
34+
35+
#
36+
# Use traditional timestamp format.
37+
# To enable high precision timestamps, comment out the following line.
38+
#
39+
#$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
40+
41+
# Define a custom template
42+
$template ACSFileFormat,"%TIMESTAMP% %HOSTNAME% %syslogseverity-text:::uppercase% %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n"
43+
$ActionFileDefaultTemplate ACSFileFormat
44+
45+
#
46+
# Set the default permissions for all log files.
47+
#
48+
$FileOwner root
49+
$FileGroup adm
50+
$FileCreateMode 0640
51+
$DirCreateMode 0755
52+
$Umask 0022
53+
54+
#
55+
# Where to place spool and state files
56+
#
57+
$WorkDirectory /var/spool/rsyslog
58+
59+
#
60+
# Include all config files in /etc/rsyslog.d/
61+
#
62+
$IncludeConfig /etc/rsyslog.d/*.conf
63+
64+
65+
###############
66+
#### RULES ####
67+
###############
68+

dockers/docker-base/sources.list

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Debian mirror on Microsoft Azure
2+
## Ref: http://debian-archive.trafficmanager.net/
3+
4+
deb http://debian-archive.trafficmanager.net/debian/ jessie main contrib non-free
5+
deb-src http://debian-archive.trafficmanager.net/debian/ jessie main contrib non-free
6+
deb http://debian-archive.trafficmanager.net/debian-security/ jessie/updates main contrib non-free
7+
deb-src http://debian-archive.trafficmanager.net/debian-security/ jessie/updates main contrib non-free

0 commit comments

Comments
 (0)