Let Re denote a finite commutative chain ring with the maximal ideal 〈u〉 and the nilpotency index e, and let R‾e=Re/〈u〉 be the residue field of Re. Let σ0 be an automorphism of Re, and let σ‾0 be the corresponding automorphism of the residue field R‾e of Re, defined as σ‾0(a+〈u〉)=σ0(a)+〈u〉 for all a+〈u〉∈R‾e. Let σ be an automorphism of Ren corresponding to the automorphism σ0 of Re, defined as σ(v1,v2,…,vn)=(σ0(v1),σ0(v2),…,σ0(vn)) for all (v1,v2,…,vn)∈Ren. In this paper, we obtain explicit enumeration formulae for all σ-LCD codes of an arbitrary length over the chain ring Re when σ‾02 is the identity automorphism of R‾e. With the help of these enumeration formulae and by applying the classification algorithm, we classify all Euclidean LCD codes of lengths 2, 3, 4 and 5 over the chain ring F2[u]/〈u2〉 and of lengths 2, 3 and 4 over the chain ring F3[u]/〈u2〉, and all σ-LCD codes of lengths 2, 3 and 4 over the chain ring F4[u]/〈u2〉, where σ0 is an automorphism of F4[u]/〈u2〉 such that the corresponding automorphism σ‾0 of the residue field F4 has order 2. Besides this, we show that the class of σ-LCD codes over Re is asymptotically good, and that every free linear [n,k,d]-code over Re is equivalent to a σ-LCD [n,k,d]-code over Re when |R‾e|>4. We also explicitly determine all inequivalent σ-LCD [n,1,d]-codes and [n,n−1,d]-codes over Re for 1≤d≤n.